don't include verb stems etc in the word list'

This commit is contained in:
adueck 2023-01-29 21:13:45 +05:00
parent ee93aa6ebb
commit 091eacf6f0
1 changed files with 4 additions and 0 deletions

View File

@ -48,6 +48,7 @@ export function dePsHash(h: PsHash): T.PsWord {
}
function search(object: any): Set<PsHash> {
const fieldsToIgnore = ["info", "type", "perfectiveSplit"];
let splitError: any = false;
// adapted from
// https://www.mikedoesweb.com/2016/es6-depth-first-object-tree-search/
@ -56,6 +57,9 @@ function search(object: any): Set<PsHash> {
return found;
}
Object.keys(haystack).forEach((key: string) => {
if (fieldsToIgnore.includes(key)) {
return;
}
if(key === "p" && typeof haystack[key] === "string") {
try {
splitPsString(haystack).forEach(word => {