diff options
Diffstat (limited to 'src/lib/db/seed.ts')
-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 || []; |