diff options
author | polwex <polwex@sortug.com> | 2025-05-29 14:07:40 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-05-29 14:07:40 +0700 |
commit | 4ed3994fb0f6a2a09eb6ac433a62daee2fc01686 (patch) | |
tree | 401ac6e9241eccfc584de72ce3abead28e2f3f83 | |
parent | 06e8d0a0d636f539f20ece3d9d767190d0a71b3b (diff) |
m
-rw-r--r-- | src/lib/db/seed.ts | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/db/seed.ts b/src/lib/db/seed.ts index 0e291c3..a196b6a 100644 --- a/src/lib/db/seed.ts +++ b/src/lib/db/seed.ts @@ -556,16 +556,19 @@ type SorSyl = { async function handleWord(j: any) { let ts = Date.now(); const analyzed = await findLemma(j.word, j.lang_code); + console.log(analyzed.segments.length); if (analyzed.segments.length !== 1) return console.error("wtf bruh", analyzed); const seg = analyzed.segments[0]; - const isLemma = analyzed.input === seg.lemma; + if (!seg) console.log("no seg", analyzed); + const isLemma = analyzed.input === seg.root.lemma; if (!isLemma) - return console.error("not lemma", { - ...seg, - word: j.word, - input: analyzed.input, - }); + // return console.error("not lemma", { + // ...seg, + // word: j.word, + // input: analyzed.input, + // }); + return; const wordId = pdb.addWord(j.word, j.lang_code); const sounds = j.sounds || []; |