don't include verb stems etc in the word list'
This commit is contained in:
parent
ee93aa6ebb
commit
091eacf6f0
|
@ -48,6 +48,7 @@ export function dePsHash(h: PsHash): T.PsWord {
|
||||||
}
|
}
|
||||||
|
|
||||||
function search(object: any): Set<PsHash> {
|
function search(object: any): Set<PsHash> {
|
||||||
|
const fieldsToIgnore = ["info", "type", "perfectiveSplit"];
|
||||||
let splitError: any = false;
|
let splitError: any = false;
|
||||||
// adapted from
|
// adapted from
|
||||||
// https://www.mikedoesweb.com/2016/es6-depth-first-object-tree-search/
|
// https://www.mikedoesweb.com/2016/es6-depth-first-object-tree-search/
|
||||||
|
@ -56,6 +57,9 @@ function search(object: any): Set<PsHash> {
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
Object.keys(haystack).forEach((key: string) => {
|
Object.keys(haystack).forEach((key: string) => {
|
||||||
|
if (fieldsToIgnore.includes(key)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(key === "p" && typeof haystack[key] === "string") {
|
if(key === "p" && typeof haystack[key] === "string") {
|
||||||
try {
|
try {
|
||||||
splitPsString(haystack).forEach(word => {
|
splitPsString(haystack).forEach(word => {
|
||||||
|
|
Loading…
Reference in New Issue