From 091eacf6f03965e150e79c9a88b4842b62db6be4 Mon Sep 17 00:00:00 2001 From: adueck Date: Sun, 29 Jan 2023 21:13:45 +0500 Subject: [PATCH] don't include verb stems etc in the word list' --- functions/src/word-list-maker.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/src/word-list-maker.ts b/functions/src/word-list-maker.ts index d0816dd..dfe35a5 100644 --- a/functions/src/word-list-maker.ts +++ b/functions/src/word-list-maker.ts @@ -48,6 +48,7 @@ export function dePsHash(h: PsHash): T.PsWord { } function search(object: any): Set { + 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 { 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 => {