fix(tokenizer): lazy yomitan term-only frequency fallback

This commit is contained in:
sudacode committed 2026-03-02 01:45:37 -08:00
1 parent 629fe97ef7
commit 737101fe9e
5 files changed
+298 -79

No files matched your search

+5
View File
@@ -346,6 +346,11 @@ test('tokenizeSubtitle queries headword frequencies with token reading for disam
webContents: {
executeJavaScript: async (script: string) => {
if (script.includes('getTermFrequencies')) {
assert.equal(
script.includes('"term":"鍛える","reading":null'),
false,
'should not eagerly include term-only fallback pair when reading lookup is present',
);
if (!script.includes('"term":"鍛える","reading":"きた"')) {
return [];
}