From 5a2bc4e542b7f22d1e6a4ba318cfcdc33817d34a Mon Sep 17 00:00:00 2001 From: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Date: Fri, 2 Feb 2024 21:53:42 -0500 Subject: Add frequency number handlebars (#600) * Add frequencies-num handlebar * Fix handlebar name * Fix inconsistent variable name format * Add frequency-number to anki tests * Use full names for total and frequency variables * Migrate handlebars to JS, split rank and occurance, add average * Remove left behind frequency-number * Fix "occurrence" spelling * Cleanup types * Add frequency support for kanji cards * Fix code style * Clean up most of duplicate code and merge functions * Fix frequencies.length check * Use less witchcraft and remove redundant type casting --- .../default-anki-field-templates.handlebars | 32 ++ ext/js/data/sandbox/anki-note-data-creator.js | 69 ++++ ext/js/pages/settings/anki-controller.js | 9 + test/data/anki-note-builder-test-results.json | 394 +++++++++++++++++++++ test/data/translator-test-results-note-data1.json | 196 ++++++++++ test/utilities/anki.js | 9 + types/ext/anki-templates.d.ts | 4 + 7 files changed, 713 insertions(+) diff --git a/ext/data/templates/default-anki-field-templates.handlebars b/ext/data/templates/default-anki-field-templates.handlebars index 0ea98e5e..07efd07e 100644 --- a/ext/data/templates/default-anki-field-templates.handlebars +++ b/ext/data/templates/default-anki-field-templates.handlebars @@ -302,6 +302,38 @@ {{~/if~}} {{/inline}} +{{#*inline "frequency-harmonic-rank"}} + {{~#if (op "===" definition.frequencyHarmonic -1) ~}} + 9999999 + {{~else ~}} + {{definition.frequencyHarmonic}} + {{~/if~}} +{{/inline}} + +{{#*inline "frequency-harmonic-occurrence"}} + {{~#if (op "===" definition.frequencyHarmonic -1) ~}} + 0 + {{~else ~}} + {{definition.frequencyHarmonic}} + {{~/if~}} +{{/inline}} + +{{#*inline "frequency-average-rank"}} + {{~#if (op "===" definition.frequencyAverage -1) ~}} + 9999999 + {{~else ~}} + {{definition.frequencyAverage}} + {{~/if~}} +{{/inline}} + +{{#*inline "frequency-average-occurrence"}} + {{~#if (op "===" definition.frequencyAverage -1) ~}} + 0 + {{~else ~}} + {{definition.frequencyAverage}} + {{~/if~}} +{{/inline}} + {{#*inline "stroke-count"}} {{~#scope~}} {{~set "found" false~}} diff --git a/ext/js/data/sandbox/anki-note-data-creator.js b/ext/js/data/sandbox/anki-note-data-creator.js index 51679662..79570532 100644 --- a/ext/js/data/sandbox/anki-note-data-creator.js +++ b/ext/js/data/sandbox/anki-note-data-creator.js @@ -170,6 +170,67 @@ function getPublicContext(context) { }; } +/** + * @param {import('dictionary').TermDictionaryEntry|import('dictionary').KanjiDictionaryEntry} dictionaryEntry + * @returns {number[]} + */ +function getFrequencyNumbers(dictionaryEntry) { + let previousDictionary; + const frequencies = []; + for (const {dictionary, frequency, displayValue} of dictionaryEntry.frequencies) { + if (dictionary === previousDictionary) { + continue; + } + previousDictionary = dictionary; + + if (displayValue !== null) { + const frequencyMatch = displayValue.match(/\d+/); + if (frequencyMatch !== null) { + frequencies.push(Number.parseInt(frequencyMatch[0], 10)); + continue; + } + } + frequencies.push(frequency); + } + return frequencies; +} + +/** + * @param {import('dictionary').TermDictionaryEntry|import('dictionary').KanjiDictionaryEntry} dictionaryEntry + * @returns {number} + */ +function getFrequencyHarmonic(dictionaryEntry) { + const frequencies = getFrequencyNumbers(dictionaryEntry); + + if (frequencies.length === 0) { + return -1; + } + + let total = 0; + for (const frequency of frequencies) { + total += 1 / frequency; + } + return Math.floor(frequencies.length / total); +} + +/** + * @param {import('dictionary').TermDictionaryEntry|import('dictionary').KanjiDictionaryEntry} dictionaryEntry + * @returns {number} + */ +function getFrequencyAverage(dictionaryEntry) { + const frequencies = getFrequencyNumbers(dictionaryEntry); + + if (frequencies.length === 0) { + return -1; + } + + let total = 0; + for (const frequency of frequencies) { + total += frequency; + } + return Math.floor(total / frequencies.length); +} + /** * @param {import('dictionary').DictionaryEntry} dictionaryEntry * @returns {import('anki-templates').PitchGroup[]} @@ -272,6 +333,8 @@ function getKanjiDefinition(dictionaryEntry, context) { const stats = createCachedValue(getKanjiStats.bind(null, dictionaryEntry)); const tags = createCachedValue(convertTags.bind(null, dictionaryEntry.tags)); const frequencies = createCachedValue(getKanjiFrequencies.bind(null, dictionaryEntry)); + const frequencyHarmonic = createCachedValue(getFrequencyHarmonic.bind(null, dictionaryEntry)); + const frequencyAverage = createCachedValue(getFrequencyAverage.bind(null, dictionaryEntry)); const cloze = createCachedValue(getCloze.bind(null, dictionaryEntry, context)); return { @@ -284,6 +347,8 @@ function getKanjiDefinition(dictionaryEntry, context) { get tags() { return getCachedValue(tags); }, get stats() { return getCachedValue(stats); }, get frequencies() { return getCachedValue(frequencies); }, + get frequencyHarmonic() { return getCachedValue(frequencyHarmonic); }, + get frequencyAverage() { return getCachedValue(frequencyAverage); }, url, get cloze() { return getCachedValue(cloze); } }; @@ -366,6 +431,8 @@ function getTermDefinition(dictionaryEntry, context, resultOutputMode) { const termTags = createCachedValue(getTermTags.bind(null, dictionaryEntry, type)); const expressions = createCachedValue(getTermExpressions.bind(null, dictionaryEntry)); const frequencies = createCachedValue(getTermFrequencies.bind(null, dictionaryEntry)); + const frequencyHarmonic = createCachedValue(getFrequencyHarmonic.bind(null, dictionaryEntry)); + const frequencyAverage = createCachedValue(getFrequencyAverage.bind(null, dictionaryEntry)); const pitches = createCachedValue(getTermPitches.bind(null, dictionaryEntry)); const phoneticTranscriptions = createCachedValue(getTermPhoneticTranscriptions.bind(null, dictionaryEntry)); const glossary = createCachedValue(getTermGlossaryArray.bind(null, dictionaryEntry, type)); @@ -403,6 +470,8 @@ function getTermDefinition(dictionaryEntry, context, resultOutputMode) { get termTags() { return getCachedValue(termTags); }, get definitions() { return getCachedValue(commonInfo).definitions; }, get frequencies() { return getCachedValue(frequencies); }, + get frequencyHarmonic() { return getCachedValue(frequencyHarmonic); }, + get frequencyAverage() { return getCachedValue(frequencyAverage); }, get pitches() { return getCachedValue(pitches); }, get phoneticTranscriptions() { return getCachedValue(phoneticTranscriptions); }, sourceTermExactMatchCount, diff --git a/ext/js/pages/settings/anki-controller.js b/ext/js/pages/settings/anki-controller.js index ae6a71db..a0d57457 100644 --- a/ext/js/pages/settings/anki-controller.js +++ b/ext/js/pages/settings/anki-controller.js @@ -138,6 +138,10 @@ export class AnkiController { 'document-title', 'expression', 'frequencies', + 'frequency-harmonic-rank', + 'frequency-harmonic-occurrence', + 'frequency-average-rank', + 'frequency-average-occurrence', 'furigana', 'furigana-plain', 'glossary', @@ -168,6 +172,11 @@ export class AnkiController { 'cloze-suffix', 'dictionary', 'document-title', + 'frequencies', + 'frequency-harmonic-rank', + 'frequency-harmonic-occurrence', + 'frequency-average-rank', + 'frequency-average-occurrence', 'glossary', 'kunyomi', 'onyomi', diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json index b93b466b..07b3182d 100644 --- a/test/data/anki-note-builder-test-results.json +++ b/test/data/anki-note-builder-test-results.json @@ -11,6 +11,11 @@ "cloze-suffix": "cloze-suffix", "dictionary": "Test Dictionary 2", "document-title": "title", + "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "glossary": "
  1. utsu meaning 1
  2. utsu meaning 2
  3. utsu meaning 3
  4. utsu meaning 4
  5. utsu meaning 5
", "kunyomi": "う.つ, う.ち-, ぶ.つ", "onyomi": "ダ, ダアス", @@ -37,6 +42,11 @@ "cloze-suffix": "cloze-suffix", "dictionary": "Test Dictionary 2", "document-title": "title", + "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "glossary": "
  1. komu meaning 1
  2. komu meaning 2
  3. komu meaning 3
  4. komu meaning 4
  5. komu meaning 5
", "kunyomi": "-こ.む, こ.む, こ.み, -こ.み, こ.める", "onyomi": "", @@ -70,6 +80,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "", "furigana-plain": "打[だ]", "glossary": "
(n, Test Dictionary 2)
", @@ -101,6 +115,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "ダース", "furigana-plain": "打[ダース]", "glossary": "
(abbr, n, Test Dictionary 2)
", @@ -137,6 +155,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -168,6 +190,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -199,6 +225,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -230,6 +260,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -261,6 +295,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "", "furigana-plain": "打[だ]", "glossary": "
(n, Test Dictionary 2)
", @@ -292,6 +330,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "ダース", "furigana-plain": "打[ダース]", "glossary": "
(abbr, n, Test Dictionary 2)
", @@ -328,6 +370,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[う]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -359,6 +405,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[ぶ]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -390,6 +440,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[う]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -421,6 +475,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[ぶ]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -452,6 +510,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -483,6 +545,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -514,6 +580,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -545,6 +615,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -576,6 +650,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "", "furigana-plain": "打[だ]", "glossary": "
(n, Test Dictionary 2)
", @@ -607,6 +685,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "ダース", "furigana-plain": "打[ダース]", "glossary": "
(abbr, n, Test Dictionary 2)
", @@ -643,6 +725,10 @@ "document-title": "title", "expression": "画像", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "画像がぞう", "furigana-plain": "画像[がぞう]", "glossary": "
(n, Test Dictionary 2)
", @@ -679,6 +765,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "", "furigana-plain": "打[だ]", "glossary": "
(n, Test Dictionary 2)
", @@ -715,6 +805,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "ダース", "furigana-plain": "打[ダース]", "glossary": "
(abbr, n, Test Dictionary 2)
", @@ -751,6 +845,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -782,6 +880,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -818,6 +920,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -849,6 +955,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -885,6 +995,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[う]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -916,6 +1030,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[う]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -947,6 +1065,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -978,6 +1100,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -1014,6 +1140,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[ぶ]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -1045,6 +1175,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[ぶ]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -1076,6 +1210,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -1107,6 +1245,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -1143,6 +1285,10 @@ "document-title": "title", "expression": "画像", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "画像がぞう", "furigana-plain": "画像[がぞう]", "glossary": "
(n, Test Dictionary 2)
", @@ -1191,6 +1337,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[う]ち 込[こ]む", "glossary": "
  1. (vt, Test Dictionary 2)
    • uchikomu definition 1
    • uchikomu definition 2
  2. (vt, Test Dictionary 2)
    • uchikomu definition 3
    • uchikomu definition 4
", @@ -1222,6 +1372,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[ぶ]ち 込[こ]む", "glossary": "
  1. (vt, Test Dictionary 2)
    • buchikomu definition 1
    • buchikomu definition 2
  2. (vt, Test Dictionary 2)
    • buchikomu definition 3
    • buchikomu definition 4
", @@ -1253,6 +1407,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
  1. (vt, Test Dictionary 2)
    • utsu definition 1
    • utsu definition 2
  2. (vt, Test Dictionary 2)
    • utsu definition 3
    • utsu definition 4
", @@ -1284,6 +1442,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
  1. (vt, Test Dictionary 2)
    • butsu definition 1
    • butsu definition 2
  2. (vt, Test Dictionary 2)
    • butsu definition 3
    • butsu definition 4
", @@ -1315,6 +1477,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "", "furigana-plain": "打[だ]", "glossary": "
(n, Test Dictionary 2)
", @@ -1346,6 +1512,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "ダース", "furigana-plain": "打[ダース]", "glossary": "
(abbr, n, Test Dictionary 2)
", @@ -1382,6 +1552,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "", "furigana-plain": "打[う]ち 込[こ]む打[ぶ]ち 込[こ]む", "glossary": "
  1. (vt, Test Dictionary 2) (うちこむ only)
    • uchikomu definition 1
    • uchikomu definition 2
  2. (vt, Test Dictionary 2) (ぶちこむ only)
    • buchikomu definition 1
    • buchikomu definition 2
  3. (vt, Test Dictionary 2) (うちこむ only)
    • uchikomu definition 3
    • uchikomu definition 4
  4. (vt, Test Dictionary 2) (ぶちこむ only)
    • buchikomu definition 3
    • buchikomu definition 4
", @@ -1413,6 +1587,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "", "furigana-plain": "打[う]つ打[ぶ]つ", "glossary": "
  1. (vt, Test Dictionary 2) (うつ only)
    • utsu definition 1
    • utsu definition 2
  2. (vt, Test Dictionary 2) (ぶつ only)
    • butsu definition 1
    • butsu definition 2
  3. (vt, Test Dictionary 2) (うつ only)
    • utsu definition 3
    • utsu definition 4
  4. (vt, Test Dictionary 2) (ぶつ only)
    • butsu definition 3
    • butsu definition 4
", @@ -1444,6 +1622,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "", "furigana-plain": "打[だ]", "glossary": "
(n, Test Dictionary 2)
", @@ -1475,6 +1657,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "ダース", "furigana-plain": "打[ダース]", "glossary": "
(abbr, n, Test Dictionary 2)
", @@ -1511,6 +1697,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[う]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -1542,6 +1732,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[ぶ]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -1573,6 +1767,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[う]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -1604,6 +1802,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[ぶ]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -1635,6 +1837,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -1666,6 +1872,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -1697,6 +1907,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -1728,6 +1942,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -1759,6 +1977,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "", "furigana-plain": "打[だ]", "glossary": "
(n, Test Dictionary 2)
", @@ -1790,6 +2012,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "ダース", "furigana-plain": "打[ダース]", "glossary": "
(abbr, n, Test Dictionary 2)
", @@ -1826,6 +2052,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[う]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -1857,6 +2087,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[ぶ]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -1888,6 +2122,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[う]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -1919,6 +2157,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[ぶ]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -1950,6 +2192,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -1981,6 +2227,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -2012,6 +2262,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -2043,6 +2297,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -2074,6 +2332,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "", "furigana-plain": "打[だ]", "glossary": "
(n, Test Dictionary 2)
", @@ -2105,6 +2367,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "ダース", "furigana-plain": "打[ダース]", "glossary": "
(abbr, n, Test Dictionary 2)
", @@ -2141,6 +2407,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[う]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -2172,6 +2442,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[ぶ]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -2203,6 +2477,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[う]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -2234,6 +2512,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "む", "furigana-plain": "打[ぶ]ち 込[こ]む", "glossary": "
(vt, Test Dictionary 2)
", @@ -2265,6 +2547,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -2296,6 +2582,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -2327,6 +2617,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -2358,6 +2652,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[ぶ]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -2389,6 +2687,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "", "furigana-plain": "打[だ]", "glossary": "
(n, Test Dictionary 2)
", @@ -2420,6 +2722,10 @@ "document-title": "title", "expression": "打", "frequencies": "", + "frequency-harmonic-rank": "1", + "frequency-harmonic-occurrence": "1", + "frequency-average-rank": "1", + "frequency-average-occurrence": "1", "furigana": "ダース", "furigana-plain": "打[ダース]", "glossary": "
(abbr, n, Test Dictionary 2)
", @@ -2456,6 +2762,10 @@ "document-title": "title", "expression": "読む", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "む", "furigana-plain": "読[よ]む", "glossary": "
(vt, Test Dictionary 2) to read
", @@ -2492,6 +2802,10 @@ "document-title": "title", "expression": "強み", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "つよみ", "furigana-plain": "強[つよ]み", "glossary": "
(n, Test Dictionary 2) strong point
", @@ -2528,6 +2842,10 @@ "document-title": "title", "expression": "読む", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "む", "furigana-plain": "読[よ]む", "glossary": "
(vt, Test Dictionary 2) to read
", @@ -2564,6 +2882,10 @@ "document-title": "title", "expression": "打ち込む", "frequencies": "", + "frequency-harmonic-rank": "3", + "frequency-harmonic-occurrence": "3", + "frequency-average-rank": "3", + "frequency-average-occurrence": "3", "furigana": "", "furigana-plain": "打[う]ち 込[こ]む打[ぶ]ち 込[こ]む", "glossary": "
  1. (vt, Test Dictionary 2) (うちこむ only)
    • uchikomu definition 1
    • uchikomu definition 2
  2. (vt, Test Dictionary 2) (ぶちこむ only)
    • buchikomu definition 1
    • buchikomu definition 2
  3. (vt, Test Dictionary 2) (うちこむ only)
    • uchikomu definition 3
    • uchikomu definition 4
  4. (vt, Test Dictionary 2) (ぶちこむ only)
    • buchikomu definition 3
    • buchikomu definition 4
", @@ -2595,6 +2917,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "", "furigana-plain": "打[う]つ打[ぶ]つ", "glossary": "
  1. (vt, Test Dictionary 2) (うつ only)
    • utsu definition 1
    • utsu definition 2
  2. (vt, Test Dictionary 2) (ぶつ only)
    • butsu definition 1
    • butsu definition 2
  3. (vt, Test Dictionary 2) (うつ only)
    • utsu definition 3
    • utsu definition 4
  4. (vt, Test Dictionary 2) (ぶつ only)
    • butsu definition 3
    • butsu definition 4
", @@ -2631,6 +2957,10 @@ "document-title": "title", "expression": "お手前", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "お手前てまえ", "furigana-plain": "お 手前[てまえ]", "glossary": "
(n, Test Dictionary 2) otemae definition
", @@ -2667,6 +2997,10 @@ "document-title": "title", "expression": "番号", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "番号ばんごう", "furigana-plain": "番号[ばんごう]", "glossary": "
(n, Test Dictionary 2) bangou definition
", @@ -2703,6 +3037,10 @@ "document-title": "title", "expression": "中腰", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "中腰ちゅうごし", "furigana-plain": "中腰[ちゅうごし]", "glossary": "
(n, Test Dictionary 2) chuugoshi definition
", @@ -2739,6 +3077,10 @@ "document-title": "title", "expression": "所業", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "所業しょぎょう", "furigana-plain": "所業[しょぎょう]", "glossary": "
(n, Test Dictionary 2) shogyouu definition
", @@ -2775,6 +3117,10 @@ "document-title": "title", "expression": "土木工事", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "土木工事どぼくこうじ", "furigana-plain": "土木工事[どぼくこうじ]", "glossary": "
(n, Test Dictionary 2) dobokukouji definition
", @@ -2811,6 +3157,10 @@ "document-title": "title", "expression": "好き", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "き", "furigana-plain": "好[す]き", "glossary": "
(adj-na, n, Test Dictionary 2) suki definition
", @@ -2847,6 +3197,10 @@ "document-title": "title", "expression": "構造", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "構造こうぞう", "furigana-plain": "構造[こうぞう]", "glossary": "
(n, Test Dictionary 2)
", @@ -2883,6 +3237,10 @@ "document-title": "title", "expression": "のたまう", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "のたまう", "furigana-plain": "のたまう", "glossary": "
(v5, Test Dictionary 2) notamau definition
", @@ -2919,6 +3277,10 @@ "document-title": "title", "expression": "39", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "39さんきゅう", "furigana-plain": "39[さんきゅう]", "glossary": "
(Test Dictionary 2) sankyuu definition
", @@ -2955,6 +3317,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -2986,6 +3352,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -3022,6 +3392,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -3053,6 +3427,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -3089,6 +3467,10 @@ "document-title": "title", "expression": "テキスト", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "テキスト", "furigana-plain": "テキスト", "glossary": "
(n, Test Dictionary 2)
", @@ -3125,6 +3507,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -3156,6 +3542,10 @@ "document-title": "title", "expression": "打つ", "frequencies": "", + "frequency-harmonic-rank": "2", + "frequency-harmonic-occurrence": "2", + "frequency-average-rank": "2", + "frequency-average-occurrence": "2", "furigana": "つ", "furigana-plain": "打[う]つ", "glossary": "
(vt, Test Dictionary 2)
", @@ -3192,6 +3582,10 @@ "document-title": "title", "expression": "凄い", "frequencies": "", + "frequency-harmonic-rank": "9999999", + "frequency-harmonic-occurrence": "0", + "frequency-average-rank": "9999999", + "frequency-average-occurrence": "0", "furigana": "すごい", "furigana-plain": "凄[すご]い", "glossary": "
(adj-i, Test Dictionary 2) sugoi definition
", diff --git a/test/data/translator-test-results-note-data1.json b/test/data/translator-test-results-note-data1.json index 00ab1952..610bb451 100644 --- a/test/data/translator-test-results-note-data1.json +++ b/test/data/translator-test-results-note-data1.json @@ -131,6 +131,8 @@ "frequency": 5 } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "url": "url:", "cloze": { "sentence": "", @@ -294,6 +296,8 @@ "frequency": "six" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "url": "url:", "cloze": { "sentence": "", @@ -601,6 +605,8 @@ "frequency": 26 } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -921,6 +927,8 @@ "frequency": "twenty-seven" } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -1233,6 +1241,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -1544,6 +1554,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -1855,6 +1867,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -2166,6 +2180,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -2481,6 +2497,8 @@ "frequency": 26 } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -2801,6 +2819,8 @@ "frequency": "twenty-seven" } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -3143,6 +3163,8 @@ "frequency": 30 } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -3562,6 +3584,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -3981,6 +4005,8 @@ "frequency": 30 } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -4400,6 +4426,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -4791,6 +4819,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -5104,6 +5134,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -5417,6 +5449,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -5730,6 +5764,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -6045,6 +6081,8 @@ "frequency": 26 } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -6365,6 +6403,8 @@ "frequency": "twenty-seven" } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -6524,6 +6564,8 @@ } ], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -6840,6 +6882,8 @@ "frequency": 26 } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -7165,6 +7209,8 @@ "frequency": "twenty-seven" } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -7477,6 +7523,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -7788,6 +7836,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -8104,6 +8154,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -8415,6 +8467,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -8761,6 +8815,8 @@ "frequency": 30 } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -9180,6 +9236,8 @@ "frequency": 30 } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -9571,6 +9629,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -9884,6 +9944,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -10230,6 +10292,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -10649,6 +10713,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -11040,6 +11106,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -11353,6 +11421,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -11516,6 +11586,8 @@ } ], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -11911,6 +11983,8 @@ "frequency": 30 } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -12353,6 +12427,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -12767,6 +12843,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -13111,6 +13189,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -13420,6 +13500,8 @@ "frequency": 26 } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -13738,6 +13820,8 @@ "frequency": "twenty-seven" } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -14377,6 +14461,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -15089,6 +15175,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 2, @@ -15392,6 +15480,8 @@ "frequency": 26 } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -15703,6 +15793,8 @@ "frequency": "twenty-seven" } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -16043,6 +16135,8 @@ "frequency": 30 } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -16466,6 +16560,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -16889,6 +16985,8 @@ "frequency": 30 } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -17312,6 +17410,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -17703,6 +17803,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -18016,6 +18118,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -18329,6 +18433,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -18642,6 +18748,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -18957,6 +19065,8 @@ "frequency": 26 } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -19277,6 +19387,8 @@ "frequency": "twenty-seven" } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -19619,6 +19731,8 @@ "frequency": 30 } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -20038,6 +20152,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -20457,6 +20573,8 @@ "frequency": 30 } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -20876,6 +20994,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -21267,6 +21387,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -21580,6 +21702,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -21893,6 +22017,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -22206,6 +22332,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -22521,6 +22649,8 @@ "frequency": 26 } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -22841,6 +22971,8 @@ "frequency": "twenty-seven" } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -23183,6 +23315,8 @@ "frequency": 30 } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -23602,6 +23736,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -24021,6 +24157,8 @@ "frequency": 30 } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -24440,6 +24578,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -24831,6 +24971,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -25144,6 +25286,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -25457,6 +25601,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -25770,6 +25916,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -26085,6 +26233,8 @@ "frequency": 26 } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -26405,6 +26555,8 @@ "frequency": "twenty-seven" } ], + "frequencyHarmonic": 1, + "frequencyAverage": 1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -26560,6 +26712,8 @@ } ], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -26717,6 +26871,8 @@ } ], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -26876,6 +27032,8 @@ } ], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -27525,6 +27683,8 @@ "frequency": "thirty-one" } ], + "frequencyHarmonic": 3, + "frequencyAverage": 3, "pitches": [ { "index": 0, @@ -28237,6 +28397,8 @@ "frequency": "twenty-nine" } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -28403,6 +28565,8 @@ ], "termTags": [], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [ { "index": 0, @@ -28694,6 +28858,8 @@ ], "termTags": [], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [ { "index": 0, @@ -28879,6 +29045,8 @@ ], "termTags": [], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [ { "index": 0, @@ -29064,6 +29232,8 @@ ], "termTags": [], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [ { "index": 0, @@ -29249,6 +29419,8 @@ ], "termTags": [], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [ { "index": 0, @@ -29440,6 +29612,8 @@ ], "termTags": [], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [ { "index": 0, @@ -29675,6 +29849,8 @@ } ], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -29788,6 +29964,8 @@ ], "termTags": [], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -29887,6 +30065,8 @@ "definitionTags": [], "termTags": [], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -30199,6 +30379,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -30510,6 +30692,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -30826,6 +31010,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -31137,6 +31323,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -31291,6 +31479,8 @@ } ], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 1, @@ -31603,6 +31793,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -31914,6 +32106,8 @@ "frequency": 28 } ], + "frequencyHarmonic": 2, + "frequencyAverage": 2, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, @@ -32033,6 +32227,8 @@ ], "termTags": [], "frequencies": [], + "frequencyHarmonic": -1, + "frequencyAverage": -1, "pitches": [], "phoneticTranscriptions": [], "sourceTermExactMatchCount": 0, diff --git a/test/utilities/anki.js b/test/utilities/anki.js index d0e095bd..4c6c6d57 100644 --- a/test/utilities/anki.js +++ b/test/utilities/anki.js @@ -65,6 +65,10 @@ function getFieldMarkers(type) { 'document-title', 'expression', 'frequencies', + 'frequency-harmonic-rank', + 'frequency-harmonic-occurrence', + 'frequency-average-rank', + 'frequency-average-occurrence', 'furigana', 'furigana-plain', 'glossary', @@ -94,6 +98,11 @@ function getFieldMarkers(type) { 'cloze-suffix', 'dictionary', 'document-title', + 'frequencies', + 'frequency-harmonic-rank', + 'frequency-harmonic-occurrence', + 'frequency-average-rank', + 'frequency-average-occurrence', 'glossary', 'kunyomi', 'onyomi', diff --git a/types/ext/anki-templates.d.ts b/types/ext/anki-templates.d.ts index ad90e93e..37c3d52f 100644 --- a/types/ext/anki-templates.d.ts +++ b/types/ext/anki-templates.d.ts @@ -135,6 +135,8 @@ export type KanjiDictionaryEntry = { readonly tags: Tag[]; readonly stats: KanjiStatGroups; readonly frequencies: KanjiFrequency[]; + readonly frequencyHarmonic: number; + readonly frequencyAverage: number; url: string; readonly cloze: Cloze; }; @@ -190,6 +192,8 @@ export type TermDictionaryEntry = { readonly termTags?: Tag[]; readonly definitions?: TermDefinition[]; readonly frequencies: TermFrequency[]; + readonly frequencyHarmonic: number; + readonly frequencyAverage: number; readonly pitches: TermPitchAccent[]; readonly phoneticTranscriptions: TermPhoneticTranscription[]; sourceTermExactMatchCount: number; -- cgit v1.2.3