From 309d0b41ff2936a8665f39708c678e3ff9c23742 Mon Sep 17 00:00:00 2001 From: StefanVukovic99 Date: Sun, 28 Jan 2024 16:35:05 +0100 Subject: add translator text transformation tests (#565) * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * add tests * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions --------- Co-authored-by: toasted-nutbread Co-authored-by: Darius Jahandarie --- test/data/anki-note-builder-test-results.json | 309 +++ test/data/database-test-cases.json | 6 +- .../valid-dictionary1/term_bank_1.json | 4 +- test/data/translator-test-inputs.json | 75 + test/data/translator-test-results-note-data1.json | 2249 ++++++++++++++++++++ test/data/translator-test-results.json | 1291 +++++++++++ 6 files changed, 3930 insertions(+), 4 deletions(-) diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json index 7129d748..b93b466b 100644 --- a/test/data/anki-note-builder-test-results.json +++ b/test/data/anki-note-builder-test-results.json @@ -2903,5 +2903,314 @@ "url": "url:" } ] + }, + { + "name": "Test text transformations - convertNumericCharacters", + "results": [ + { + "audio": "", + "clipboard-image": "", + "clipboard-text": "", + "cloze-body": "39", + "cloze-prefix": "cloze-prefix", + "cloze-suffix": "cloze-suffix", + "conjugation": "", + "dictionary": "Test Dictionary 2", + "document-title": "title", + "expression": "39", + "frequencies": "", + "furigana": "39さんきゅう", + "furigana-plain": "39[さんきゅう]", + "glossary": "
(Test Dictionary 2) sankyuu definition
", + "glossary-brief": "
sankyuu definition
", + "glossary-no-dictionary": "
sankyuu definition
", + "part-of-speech": "Unknown", + "pitch-accents": "No pitch accent data", + "pitch-accent-graphs": "No pitch accent data", + "pitch-accent-positions": "No pitch accent data", + "phonetic-transcriptions": "", + "reading": "さんきゅう", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefix39cloze-suffix", + "sentence-furigana": "cloze-prefix39cloze-suffix", + "tags": "", + "url": "url:" + } + ] + }, + { + "name": "Test text transformations - convertAlphabeticCharacters", + "results": [ + { + "audio": "", + "clipboard-image": "", + "clipboard-text": "", + "cloze-body": "utsu", + "cloze-prefix": "cloze-prefix", + "cloze-suffix": "cloze-suffix", + "conjugation": "", + "dictionary": "Test Dictionary 2", + "document-title": "title", + "expression": "打つ", + "frequencies": "
  • Test Dictionary 2: 2
  • Test Dictionary 2: 6
  • Test Dictionary 2: 10
  • Test Dictionary 2: sixteen
  • Test Dictionary 2: twenty-two (22)
  • Test Dictionary 2: 28
", + "furigana": "つ", + "furigana-plain": "打[う]つ", + "glossary": "
(vt, Test Dictionary 2)
  • utsu definition 1
  • utsu definition 2
", + "glossary-brief": "
  • utsu definition 1
  • utsu definition 2
", + "glossary-no-dictionary": "
(vt)
  • utsu definition 1
  • utsu definition 2
", + "part-of-speech": "Godan verb", + "pitch-accents": "No pitch accent data", + "pitch-accent-graphs": "No pitch accent data", + "pitch-accent-positions": "No pitch accent data", + "phonetic-transcriptions": "", + "reading": "うつ", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefixutsucloze-suffix", + "sentence-furigana": "cloze-prefixutsucloze-suffix", + "tags": "vt", + "url": "url:" + }, + { + "audio": "", + "clipboard-image": "", + "clipboard-text": "", + "cloze-body": "utsu", + "cloze-prefix": "cloze-prefix", + "cloze-suffix": "cloze-suffix", + "conjugation": "", + "dictionary": "Test Dictionary 2", + "document-title": "title", + "expression": "打つ", + "frequencies": "
  • Test Dictionary 2: 2
  • Test Dictionary 2: 6
  • Test Dictionary 2: 10
  • Test Dictionary 2: sixteen
  • Test Dictionary 2: twenty-two (22)
  • Test Dictionary 2: 28
", + "furigana": "つ", + "furigana-plain": "打[う]つ", + "glossary": "
(vt, Test Dictionary 2)
  • utsu definition 3
  • utsu definition 4
", + "glossary-brief": "
  • utsu definition 3
  • utsu definition 4
", + "glossary-no-dictionary": "
(vt)
  • utsu definition 3
  • utsu definition 4
", + "part-of-speech": "Godan verb", + "pitch-accents": "No pitch accent data", + "pitch-accent-graphs": "No pitch accent data", + "pitch-accent-positions": "No pitch accent data", + "phonetic-transcriptions": "", + "reading": "うつ", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefixutsucloze-suffix", + "sentence-furigana": "cloze-prefixutsucloze-suffix", + "tags": "vt", + "url": "url:" + } + ] + }, + { + "name": "Test text transformations - convertKatakanaToHiragana", + "results": [ + { + "audio": "", + "clipboard-image": "", + "clipboard-text": "", + "cloze-body": "ウツ", + "cloze-prefix": "cloze-prefix", + "cloze-suffix": "cloze-suffix", + "conjugation": "", + "dictionary": "Test Dictionary 2", + "document-title": "title", + "expression": "打つ", + "frequencies": "
  • Test Dictionary 2: 2
  • Test Dictionary 2: 6
  • Test Dictionary 2: 10
  • Test Dictionary 2: sixteen
  • Test Dictionary 2: twenty-two (22)
  • Test Dictionary 2: 28
", + "furigana": "つ", + "furigana-plain": "打[う]つ", + "glossary": "
(vt, Test Dictionary 2)
  • utsu definition 1
  • utsu definition 2
", + "glossary-brief": "
  • utsu definition 1
  • utsu definition 2
", + "glossary-no-dictionary": "
(vt)
  • utsu definition 1
  • utsu definition 2
", + "part-of-speech": "Godan verb", + "pitch-accents": "No pitch accent data", + "pitch-accent-graphs": "No pitch accent data", + "pitch-accent-positions": "No pitch accent data", + "phonetic-transcriptions": "", + "reading": "うつ", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefixウツcloze-suffix", + "sentence-furigana": "cloze-prefixウツcloze-suffix", + "tags": "vt", + "url": "url:" + }, + { + "audio": "", + "clipboard-image": "", + "clipboard-text": "", + "cloze-body": "ウツ", + "cloze-prefix": "cloze-prefix", + "cloze-suffix": "cloze-suffix", + "conjugation": "", + "dictionary": "Test Dictionary 2", + "document-title": "title", + "expression": "打つ", + "frequencies": "
  • Test Dictionary 2: 2
  • Test Dictionary 2: 6
  • Test Dictionary 2: 10
  • Test Dictionary 2: sixteen
  • Test Dictionary 2: twenty-two (22)
  • Test Dictionary 2: 28
", + "furigana": "つ", + "furigana-plain": "打[う]つ", + "glossary": "
(vt, Test Dictionary 2)
  • utsu definition 3
  • utsu definition 4
", + "glossary-brief": "
  • utsu definition 3
  • utsu definition 4
", + "glossary-no-dictionary": "
(vt)
  • utsu definition 3
  • utsu definition 4
", + "part-of-speech": "Godan verb", + "pitch-accents": "No pitch accent data", + "pitch-accent-graphs": "No pitch accent data", + "pitch-accent-positions": "No pitch accent data", + "phonetic-transcriptions": "", + "reading": "うつ", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefixウツcloze-suffix", + "sentence-furigana": "cloze-prefixウツcloze-suffix", + "tags": "vt", + "url": "url:" + } + ] + }, + { + "name": "Test text transformations - convertHiraganaToKatakana", + "results": [ + { + "audio": "", + "clipboard-image": "", + "clipboard-text": "", + "cloze-body": "てきすと", + "cloze-prefix": "cloze-prefix", + "cloze-suffix": "cloze-suffix", + "conjugation": "", + "dictionary": "Test Dictionary 2", + "document-title": "title", + "expression": "テキスト", + "frequencies": "", + "furigana": "テキスト", + "furigana-plain": "テキスト", + "glossary": "
(n, Test Dictionary 2)
  • text definition 1
  • text definition 2
", + "glossary-brief": "
  • text definition 1
  • text definition 2
", + "glossary-no-dictionary": "
(n)
  • text definition 1
  • text definition 2
", + "part-of-speech": "Noun", + "pitch-accents": "No pitch accent data", + "pitch-accent-graphs": "No pitch accent data", + "pitch-accent-positions": "No pitch accent data", + "phonetic-transcriptions": "", + "reading": "テキスト", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefixてきすとcloze-suffix", + "sentence-furigana": "cloze-prefixてきすとcloze-suffix", + "tags": "n", + "url": "url:" + } + ] + }, + { + "name": "Test text transformations - convertHalfWidthCharacters, convertKatakanaToHiragana", + "results": [ + { + "audio": "", + "clipboard-image": "", + "clipboard-text": "", + "cloze-body": "ウツ", + "cloze-prefix": "cloze-prefix", + "cloze-suffix": "cloze-suffix", + "conjugation": "", + "dictionary": "Test Dictionary 2", + "document-title": "title", + "expression": "打つ", + "frequencies": "
  • Test Dictionary 2: 2
  • Test Dictionary 2: 6
  • Test Dictionary 2: 10
  • Test Dictionary 2: sixteen
  • Test Dictionary 2: twenty-two (22)
  • Test Dictionary 2: 28
", + "furigana": "つ", + "furigana-plain": "打[う]つ", + "glossary": "
(vt, Test Dictionary 2)
  • utsu definition 1
  • utsu definition 2
", + "glossary-brief": "
  • utsu definition 1
  • utsu definition 2
", + "glossary-no-dictionary": "
(vt)
  • utsu definition 1
  • utsu definition 2
", + "part-of-speech": "Godan verb", + "pitch-accents": "No pitch accent data", + "pitch-accent-graphs": "No pitch accent data", + "pitch-accent-positions": "No pitch accent data", + "phonetic-transcriptions": "", + "reading": "うつ", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefixウツcloze-suffix", + "sentence-furigana": "cloze-prefixウツcloze-suffix", + "tags": "vt", + "url": "url:" + }, + { + "audio": "", + "clipboard-image": "", + "clipboard-text": "", + "cloze-body": "ウツ", + "cloze-prefix": "cloze-prefix", + "cloze-suffix": "cloze-suffix", + "conjugation": "", + "dictionary": "Test Dictionary 2", + "document-title": "title", + "expression": "打つ", + "frequencies": "
  • Test Dictionary 2: 2
  • Test Dictionary 2: 6
  • Test Dictionary 2: 10
  • Test Dictionary 2: sixteen
  • Test Dictionary 2: twenty-two (22)
  • Test Dictionary 2: 28
", + "furigana": "つ", + "furigana-plain": "打[う]つ", + "glossary": "
(vt, Test Dictionary 2)
  • utsu definition 3
  • utsu definition 4
", + "glossary-brief": "
  • utsu definition 3
  • utsu definition 4
", + "glossary-no-dictionary": "
(vt)
  • utsu definition 3
  • utsu definition 4
", + "part-of-speech": "Godan verb", + "pitch-accents": "No pitch accent data", + "pitch-accent-graphs": "No pitch accent data", + "pitch-accent-positions": "No pitch accent data", + "phonetic-transcriptions": "", + "reading": "うつ", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefixウツcloze-suffix", + "sentence-furigana": "cloze-prefixウツcloze-suffix", + "tags": "vt", + "url": "url:" + } + ] + }, + { + "name": "Test text transformations - collapseEmphaticSequences", + "results": [ + { + "audio": "", + "clipboard-image": "", + "clipboard-text": "", + "cloze-body": "すっっごーーい", + "cloze-prefix": "cloze-prefix", + "cloze-suffix": "cloze-suffix", + "conjugation": "", + "dictionary": "Test Dictionary 2", + "document-title": "title", + "expression": "凄い", + "frequencies": "", + "furigana": "すごい", + "furigana-plain": "凄[すご]い", + "glossary": "
(adj-i, Test Dictionary 2) sugoi definition
", + "glossary-brief": "
sugoi definition
", + "glossary-no-dictionary": "
(adj-i) sugoi definition
", + "part-of-speech": "I-adjective", + "pitch-accents": "No pitch accent data", + "pitch-accent-graphs": "No pitch accent data", + "pitch-accent-positions": "No pitch accent data", + "phonetic-transcriptions": "", + "reading": "すごい", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefixすっっごーーいcloze-suffix", + "sentence-furigana": "cloze-prefixすっっごーーいcloze-suffix", + "tags": "adj-i", + "url": "url:" + } + ] } ] \ No newline at end of file diff --git a/test/data/database-test-cases.json b/test/data/database-test-cases.json index 611903dd..6d0f74ce 100644 --- a/test/data/database-test-cases.json +++ b/test/data/database-test-cases.json @@ -27,7 +27,7 @@ "ipa": 1 }, "terms": { - "total": 25 + "total": 27 } } }, @@ -36,7 +36,7 @@ { "kanji": 2, "kanjiMeta": 6, - "terms": 25, + "terms": 27, "termMeta": 39, "tagMeta": 15, "media": 6 @@ -45,7 +45,7 @@ "total": { "kanji": 2, "kanjiMeta": 6, - "terms": 25, + "terms": 27, "termMeta": 39, "tagMeta": 15, "media": 6 diff --git a/test/data/dictionaries/valid-dictionary1/term_bank_1.json b/test/data/dictionaries/valid-dictionary1/term_bank_1.json index 9472bf5c..d2012d33 100644 --- a/test/data/dictionaries/valid-dictionary1/term_bank_1.json +++ b/test/data/dictionaries/valid-dictionary1/term_bank_1.json @@ -339,5 +339,7 @@ 101, "P E1" ], ["のたまう", "のたまう", "v5", "v5", 1, ["notamau definition"], 15, ""], - ["のたもうた", "のたもうた", "", "", 1, [["のたまう", ["past"]]], 16, ""] + ["のたもうた", "のたもうた", "", "", 1, [["のたまう", ["past"]]], 16, ""], + ["39", "さんきゅう", "", "", 1, ["sankyuu definition"], 17, ""], + ["凄い", "すごい", "adj-i", "adj-i", 1, ["sugoi definition"], 18, ""] ] \ No newline at end of file diff --git a/test/data/translator-test-inputs.json b/test/data/translator-test-inputs.json index ce449c1e..588929de 100644 --- a/test/data/translator-test-inputs.json +++ b/test/data/translator-test-inputs.json @@ -352,6 +352,81 @@ "mode": "split", "text": "のたもうた", "options": "default" + }, + { + "name": "Test text transformations - convertNumericCharacters", + "func": "findTerms", + "mode": "split", + "text": "39", + "options": [ + "default", + { + "convertNumericCharacters": "true", + "removeNonJapaneseCharacters": false + } + ] + }, + { + "name": "Test text transformations - convertAlphabeticCharacters", + "func": "findTerms", + "mode": "split", + "text": "utsu", + "options": [ + "default", + { + "convertAlphabeticCharacters": "true", + "removeNonJapaneseCharacters": false + } + ] + }, + { + "name": "Test text transformations - convertKatakanaToHiragana", + "func": "findTerms", + "mode": "split", + "text": "ウツ", + "options": [ + "default", + { + "convertKatakanaToHiragana": "true" + } + ] + }, + { + "name": "Test text transformations - convertHiraganaToKatakana", + "func": "findTerms", + "mode": "split", + "text": "てきすと", + "options": [ + "default", + { + "convertHiraganaToKatakana": "true" + } + ] + }, + { + "name": "Test text transformations - convertHalfWidthCharacters, convertKatakanaToHiragana", + "func": "findTerms", + "mode": "split", + "text": "ウツ", + "options": [ + "default", + { + "convertHalfWidthCharacters": "true", + "convertKatakanaToHiragana": "true" + } + ] + }, + { + "name": "Test text transformations - collapseEmphaticSequences", + "func": "findTerms", + "mode": "split", + "text": "すっっごーーい", + "options": [ + "default", + { + "collapseEmphaticSequences": "full" + } + ] } ] } \ No newline at end of file diff --git a/test/data/translator-test-results-note-data1.json b/test/data/translator-test-results-note-data1.json index c34842da..00ab1952 100644 --- a/test/data/translator-test-results-note-data1.json +++ b/test/data/translator-test-results-note-data1.json @@ -29832,5 +29832,2254 @@ "media": {} } ] + }, + { + "name": "Test text transformations - convertNumericCharacters", + "noteDataList": [ + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 25, + "source": "39", + "rawSource": "39", + "sourceTerm": "39", + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "isPrimary": true, + "sequence": 17, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "39", + "reading": "さんきゅう", + "expressions": [ + { + "sourceTerm": "39", + "expression": "39", + "reading": "さんきゅう", + "termTags": [], + "frequencies": [], + "pitches": [], + "furiganaSegments": [ + { + "text": "39", + "furigana": "さんきゅう" + } + ], + "termFrequency": "normal", + "wordClasses": [] + } + ], + "glossary": [ + "sankyuu definition" + ], + "definitionTags": [], + "termTags": [], + "frequencies": [], + "pitches": [], + "phoneticTranscriptions": [], + "sourceTermExactMatchCount": 1, + "url": "url:", + "cloze": { + "sentence": "", + "prefix": "", + "body": "", + "suffix": "" + }, + "furiganaSegments": [ + { + "text": "39", + "furigana": "さんきゅう" + } + ] + }, + "glossaryLayoutMode": "default", + "compactTags": false, + "group": false, + "merge": false, + "modeTermKanji": false, + "modeTermKana": false, + "modeKanji": false, + "compactGlossaries": false, + "uniqueExpressions": [ + "39" + ], + "uniqueReadings": [ + "さんきゅう" + ], + "pitches": [], + "pitchCount": 0, + "phoneticTranscriptions": [], + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + } + ] + }, + { + "name": "Test text transformations - convertAlphabeticCharacters", + "noteDataList": [ + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 3, + "source": "うつ", + "rawSource": "utsu", + "sourceTerm": "うつ", + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 10, + "isPrimary": true, + "sequence": 3, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "打つ", + "reading": "うつ", + "expressions": [ + { + "sourceTerm": "うつ", + "expression": "打つ", + "reading": "うつ", + "termTags": [ + { + "name": "E1", + "category": "default", + "notes": "example tag 1", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "v5" + ] + } + ], + "glossary": [ + "utsu definition 1", + "utsu definition 2" + ], + "definitionTags": [ + { + "name": "vt", + "category": "partOfSpeech", + "notes": "transitive verb", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [ + { + "name": "E1", + "category": "default", + "notes": "example tag 1", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "phoneticTranscriptions": [], + "sourceTermExactMatchCount": 0, + "url": "url:", + "cloze": { + "sentence": "", + "prefix": "", + "body": "", + "suffix": "" + }, + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ] + }, + "glossaryLayoutMode": "default", + "compactTags": false, + "group": false, + "merge": false, + "modeTermKanji": false, + "modeTermKana": false, + "modeKanji": false, + "compactGlossaries": false, + "uniqueExpressions": [ + "打つ" + ], + "uniqueReadings": [ + "うつ" + ], + "pitches": [], + "pitchCount": 0, + "phoneticTranscriptions": [], + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + }, + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 4, + "source": "うつ", + "rawSource": "utsu", + "sourceTerm": "うつ", + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "isPrimary": true, + "sequence": 3, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "打つ", + "reading": "うつ", + "expressions": [ + { + "sourceTerm": "うつ", + "expression": "打つ", + "reading": "うつ", + "termTags": [ + { + "name": "E2", + "category": "default", + "notes": "example tag 2", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "v5" + ] + } + ], + "glossary": [ + "utsu definition 3", + "utsu definition 4" + ], + "definitionTags": [ + { + "name": "vt", + "category": "partOfSpeech", + "notes": "transitive verb", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [ + { + "name": "E2", + "category": "default", + "notes": "example tag 2", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "phoneticTranscriptions": [], + "sourceTermExactMatchCount": 0, + "url": "url:", + "cloze": { + "sentence": "", + "prefix": "", + "body": "", + "suffix": "" + }, + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ] + }, + "glossaryLayoutMode": "default", + "compactTags": false, + "group": false, + "merge": false, + "modeTermKanji": false, + "modeTermKana": false, + "modeKanji": false, + "compactGlossaries": false, + "uniqueExpressions": [ + "打つ" + ], + "uniqueReadings": [ + "うつ" + ], + "pitches": [], + "pitchCount": 0, + "phoneticTranscriptions": [], + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + } + ] + }, + { + "name": "Test text transformations - convertKatakanaToHiragana", + "noteDataList": [ + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 3, + "source": "うつ", + "rawSource": "ウツ", + "sourceTerm": "うつ", + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 10, + "isPrimary": true, + "sequence": 3, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "打つ", + "reading": "うつ", + "expressions": [ + { + "sourceTerm": "うつ", + "expression": "打つ", + "reading": "うつ", + "termTags": [ + { + "name": "E1", + "category": "default", + "notes": "example tag 1", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "v5" + ] + } + ], + "glossary": [ + "utsu definition 1", + "utsu definition 2" + ], + "definitionTags": [ + { + "name": "vt", + "category": "partOfSpeech", + "notes": "transitive verb", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [ + { + "name": "E1", + "category": "default", + "notes": "example tag 1", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "phoneticTranscriptions": [], + "sourceTermExactMatchCount": 0, + "url": "url:", + "cloze": { + "sentence": "", + "prefix": "", + "body": "", + "suffix": "" + }, + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ] + }, + "glossaryLayoutMode": "default", + "compactTags": false, + "group": false, + "merge": false, + "modeTermKanji": false, + "modeTermKana": false, + "modeKanji": false, + "compactGlossaries": false, + "uniqueExpressions": [ + "打つ" + ], + "uniqueReadings": [ + "うつ" + ], + "pitches": [], + "pitchCount": 0, + "phoneticTranscriptions": [], + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + }, + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 4, + "source": "うつ", + "rawSource": "ウツ", + "sourceTerm": "うつ", + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "isPrimary": true, + "sequence": 3, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "打つ", + "reading": "うつ", + "expressions": [ + { + "sourceTerm": "うつ", + "expression": "打つ", + "reading": "うつ", + "termTags": [ + { + "name": "E2", + "category": "default", + "notes": "example tag 2", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "v5" + ] + } + ], + "glossary": [ + "utsu definition 3", + "utsu definition 4" + ], + "definitionTags": [ + { + "name": "vt", + "category": "partOfSpeech", + "notes": "transitive verb", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [ + { + "name": "E2", + "category": "default", + "notes": "example tag 2", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "phoneticTranscriptions": [], + "sourceTermExactMatchCount": 0, + "url": "url:", + "cloze": { + "sentence": "", + "prefix": "", + "body": "", + "suffix": "" + }, + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ] + }, + "glossaryLayoutMode": "default", + "compactTags": false, + "group": false, + "merge": false, + "modeTermKanji": false, + "modeTermKana": false, + "modeKanji": false, + "compactGlossaries": false, + "uniqueExpressions": [ + "打つ" + ], + "uniqueReadings": [ + "うつ" + ], + "pitches": [], + "pitchCount": 0, + "phoneticTranscriptions": [], + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + } + ] + }, + { + "name": "Test text transformations - convertHiraganaToKatakana", + "noteDataList": [ + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 14, + "source": "テキスト", + "rawSource": "てきすと", + "sourceTerm": "テキスト", + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "isPrimary": true, + "sequence": 8, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "テキスト", + "reading": "テキスト", + "expressions": [ + { + "sourceTerm": "テキスト", + "expression": "テキスト", + "reading": "テキスト", + "termTags": [ + { + "name": "E1", + "category": "default", + "notes": "example tag 1", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [], + "pitches": [], + "furiganaSegments": [ + { + "text": "テキスト", + "furigana": "" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "n" + ] + } + ], + "glossary": [ + "text definition 1", + "text definition 2" + ], + "definitionTags": [ + { + "name": "n", + "category": "partOfSpeech", + "notes": "noun", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [ + { + "name": "E1", + "category": "default", + "notes": "example tag 1", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [], + "pitches": [], + "phoneticTranscriptions": [], + "sourceTermExactMatchCount": 1, + "url": "url:", + "cloze": { + "sentence": "", + "prefix": "", + "body": "", + "suffix": "" + }, + "furiganaSegments": [ + { + "text": "テキスト", + "furigana": "" + } + ] + }, + "glossaryLayoutMode": "default", + "compactTags": false, + "group": false, + "merge": false, + "modeTermKanji": false, + "modeTermKana": false, + "modeKanji": false, + "compactGlossaries": false, + "uniqueExpressions": [ + "テキスト" + ], + "uniqueReadings": [ + "テキスト" + ], + "pitches": [], + "pitchCount": 0, + "phoneticTranscriptions": [], + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + } + ] + }, + { + "name": "Test text transformations - convertHalfWidthCharacters, convertKatakanaToHiragana", + "noteDataList": [ + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 3, + "source": "うつ", + "rawSource": "ウツ", + "sourceTerm": "うつ", + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 10, + "isPrimary": true, + "sequence": 3, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "打つ", + "reading": "うつ", + "expressions": [ + { + "sourceTerm": "うつ", + "expression": "打つ", + "reading": "うつ", + "termTags": [ + { + "name": "E1", + "category": "default", + "notes": "example tag 1", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "v5" + ] + } + ], + "glossary": [ + "utsu definition 1", + "utsu definition 2" + ], + "definitionTags": [ + { + "name": "vt", + "category": "partOfSpeech", + "notes": "transitive verb", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [ + { + "name": "E1", + "category": "default", + "notes": "example tag 1", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "phoneticTranscriptions": [], + "sourceTermExactMatchCount": 0, + "url": "url:", + "cloze": { + "sentence": "", + "prefix": "", + "body": "", + "suffix": "" + }, + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ] + }, + "glossaryLayoutMode": "default", + "compactTags": false, + "group": false, + "merge": false, + "modeTermKanji": false, + "modeTermKana": false, + "modeKanji": false, + "compactGlossaries": false, + "uniqueExpressions": [ + "打つ" + ], + "uniqueReadings": [ + "うつ" + ], + "pitches": [], + "pitchCount": 0, + "phoneticTranscriptions": [], + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + }, + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 4, + "source": "うつ", + "rawSource": "ウツ", + "sourceTerm": "うつ", + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "isPrimary": true, + "sequence": 3, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "打つ", + "reading": "うつ", + "expressions": [ + { + "sourceTerm": "うつ", + "expression": "打つ", + "reading": "うつ", + "termTags": [ + { + "name": "E2", + "category": "default", + "notes": "example tag 2", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "v5" + ] + } + ], + "glossary": [ + "utsu definition 3", + "utsu definition 4" + ], + "definitionTags": [ + { + "name": "vt", + "category": "partOfSpeech", + "notes": "transitive verb", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [ + { + "name": "E2", + "category": "default", + "notes": "example tag 2", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + }, + { + "name": "P", + "category": "popular", + "notes": "popular term", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "frequencies": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 2 + }, + { + "index": 1, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": false, + "frequency": 6 + }, + { + "index": 2, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 10 + }, + { + "index": 3, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "sixteen" + }, + { + "index": 4, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": "twenty-two (22)" + }, + { + "index": 5, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "打つ", + "reading": "うつ", + "hasReading": true, + "frequency": 28 + } + ], + "pitches": [], + "phoneticTranscriptions": [], + "sourceTermExactMatchCount": 0, + "url": "url:", + "cloze": { + "sentence": "", + "prefix": "", + "body": "", + "suffix": "" + }, + "furiganaSegments": [ + { + "text": "打", + "furigana": "う" + }, + { + "text": "つ", + "furigana": "" + } + ] + }, + "glossaryLayoutMode": "default", + "compactTags": false, + "group": false, + "merge": false, + "modeTermKanji": false, + "modeTermKana": false, + "modeKanji": false, + "compactGlossaries": false, + "uniqueExpressions": [ + "打つ" + ], + "uniqueReadings": [ + "うつ" + ], + "pitches": [], + "pitchCount": 0, + "phoneticTranscriptions": [], + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + } + ] + }, + { + "name": "Test text transformations - collapseEmphaticSequences", + "noteDataList": [ + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 26, + "source": "すごい", + "rawSource": "すっっごーーい", + "sourceTerm": "すごい", + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "isPrimary": true, + "sequence": 18, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "凄い", + "reading": "すごい", + "expressions": [ + { + "sourceTerm": "すごい", + "expression": "凄い", + "reading": "すごい", + "termTags": [], + "frequencies": [], + "pitches": [], + "furiganaSegments": [ + { + "text": "凄", + "furigana": "すご" + }, + { + "text": "い", + "furigana": "" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "adj-i" + ] + } + ], + "glossary": [ + "sugoi definition" + ], + "definitionTags": [ + { + "name": "adj-i", + "category": "default", + "notes": "", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [], + "frequencies": [], + "pitches": [], + "phoneticTranscriptions": [], + "sourceTermExactMatchCount": 0, + "url": "url:", + "cloze": { + "sentence": "", + "prefix": "", + "body": "", + "suffix": "" + }, + "furiganaSegments": [ + { + "text": "凄", + "furigana": "すご" + }, + { + "text": "い", + "furigana": "" + } + ] + }, + "glossaryLayoutMode": "default", + "compactTags": false, + "group": false, + "merge": false, + "modeTermKanji": false, + "modeTermKana": false, + "modeKanji": false, + "compactGlossaries": false, + "uniqueExpressions": [ + "凄い" + ], + "uniqueReadings": [ + "すごい" + ], + "pitches": [], + "pitchCount": 0, + "phoneticTranscriptions": [], + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + } + ] } ] \ No newline at end of file diff --git a/test/data/translator-test-results.json b/test/data/translator-test-results.json index 4a81c552..8cf257ff 100644 --- a/test/data/translator-test-results.json +++ b/test/data/translator-test-results.json @@ -16960,5 +16960,1296 @@ "frequencies": [] } ] + }, + { + "name": "Test text transformations - convertNumericCharacters", + "originalTextLength": 2, + "dictionaryEntries": [ + { + "type": "term", + "isPrimary": true, + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "frequencyOrder": 0, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 1, + "maxTransformedTextLength": 2, + "headwords": [ + { + "index": 0, + "term": "39", + "reading": "さんきゅう", + "sources": [ + { + "originalText": "39", + "transformedText": "39", + "deinflectedText": "39", + "matchType": "exact", + "matchSource": "term", + "isPrimary": true + } + ], + "tags": [], + "wordClasses": [] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 25, + "score": 1, + "frequencyOrder": 0, + "sequences": [ + 17 + ], + "isPrimary": true, + "tags": [], + "entries": [ + "sankyuu definition" + ] + } + ], + "pronunciations": [], + "frequencies": [] + } + ] + }, + { + "name": "Test text transformations - convertAlphabeticCharacters", + "originalTextLength": 4, + "dictionaryEntries": [ + { + "type": "term", + "isPrimary": true, + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 10, + "frequencyOrder": 0, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 0, + "maxTransformedTextLength": 2, + "headwords": [ + { + "index": 0, + "term": "打つ", + "reading": "うつ", + "sources": [ + { + "originalText": "utsu", + "transformedText": "うつ", + "deinflectedText": "うつ", + "matchType": "exact", + "matchSource": "reading", + "isPrimary": true + } + ], + "tags": [ + { + "name": "E1", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example tag 1" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + }, + { + "name": "P", + "category": "popular", + "order": 0, + "score": 0, + "content": [ + "popular term" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "wordClasses": [ + "v5" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 3, + "score": 10, + "frequencyOrder": 0, + "sequences": [ + 3 + ], + "isPrimary": true, + "tags": [ + { + "name": "vt", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "transitive verb" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "utsu definition 1", + "utsu definition 2" + ] + } + ], + "pronunciations": [], + "frequencies": [ + { + "index": 0, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 2, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 1, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 6, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 2, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 10, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 3, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 0, + "displayValue": "sixteen", + "displayValueParsed": true + }, + { + "index": 4, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 22, + "displayValue": "twenty-two (22)", + "displayValueParsed": true + }, + { + "index": 5, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 28, + "displayValue": null, + "displayValueParsed": false + } + ] + }, + { + "type": "term", + "isPrimary": true, + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "frequencyOrder": 0, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 0, + "maxTransformedTextLength": 2, + "headwords": [ + { + "index": 0, + "term": "打つ", + "reading": "うつ", + "sources": [ + { + "originalText": "utsu", + "transformedText": "うつ", + "deinflectedText": "うつ", + "matchType": "exact", + "matchSource": "reading", + "isPrimary": true + } + ], + "tags": [ + { + "name": "E2", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example tag 2" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + }, + { + "name": "P", + "category": "popular", + "order": 0, + "score": 0, + "content": [ + "popular term" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "wordClasses": [ + "v5" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 4, + "score": 1, + "frequencyOrder": 0, + "sequences": [ + 3 + ], + "isPrimary": true, + "tags": [ + { + "name": "vt", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "transitive verb" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "utsu definition 3", + "utsu definition 4" + ] + } + ], + "pronunciations": [], + "frequencies": [ + { + "index": 0, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 2, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 1, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 6, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 2, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 10, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 3, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 0, + "displayValue": "sixteen", + "displayValueParsed": true + }, + { + "index": 4, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 22, + "displayValue": "twenty-two (22)", + "displayValueParsed": true + }, + { + "index": 5, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 28, + "displayValue": null, + "displayValueParsed": false + } + ] + } + ] + }, + { + "name": "Test text transformations - convertKatakanaToHiragana", + "originalTextLength": 2, + "dictionaryEntries": [ + { + "type": "term", + "isPrimary": true, + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 10, + "frequencyOrder": 0, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 0, + "maxTransformedTextLength": 2, + "headwords": [ + { + "index": 0, + "term": "打つ", + "reading": "うつ", + "sources": [ + { + "originalText": "ウツ", + "transformedText": "うつ", + "deinflectedText": "うつ", + "matchType": "exact", + "matchSource": "reading", + "isPrimary": true + } + ], + "tags": [ + { + "name": "E1", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example tag 1" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + }, + { + "name": "P", + "category": "popular", + "order": 0, + "score": 0, + "content": [ + "popular term" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "wordClasses": [ + "v5" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 3, + "score": 10, + "frequencyOrder": 0, + "sequences": [ + 3 + ], + "isPrimary": true, + "tags": [ + { + "name": "vt", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "transitive verb" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "utsu definition 1", + "utsu definition 2" + ] + } + ], + "pronunciations": [], + "frequencies": [ + { + "index": 0, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 2, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 1, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 6, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 2, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 10, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 3, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 0, + "displayValue": "sixteen", + "displayValueParsed": true + }, + { + "index": 4, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 22, + "displayValue": "twenty-two (22)", + "displayValueParsed": true + }, + { + "index": 5, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 28, + "displayValue": null, + "displayValueParsed": false + } + ] + }, + { + "type": "term", + "isPrimary": true, + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "frequencyOrder": 0, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 0, + "maxTransformedTextLength": 2, + "headwords": [ + { + "index": 0, + "term": "打つ", + "reading": "うつ", + "sources": [ + { + "originalText": "ウツ", + "transformedText": "うつ", + "deinflectedText": "うつ", + "matchType": "exact", + "matchSource": "reading", + "isPrimary": true + } + ], + "tags": [ + { + "name": "E2", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example tag 2" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + }, + { + "name": "P", + "category": "popular", + "order": 0, + "score": 0, + "content": [ + "popular term" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "wordClasses": [ + "v5" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 4, + "score": 1, + "frequencyOrder": 0, + "sequences": [ + 3 + ], + "isPrimary": true, + "tags": [ + { + "name": "vt", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "transitive verb" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "utsu definition 3", + "utsu definition 4" + ] + } + ], + "pronunciations": [], + "frequencies": [ + { + "index": 0, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 2, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 1, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 6, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 2, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 10, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 3, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 0, + "displayValue": "sixteen", + "displayValueParsed": true + }, + { + "index": 4, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 22, + "displayValue": "twenty-two (22)", + "displayValueParsed": true + }, + { + "index": 5, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 28, + "displayValue": null, + "displayValueParsed": false + } + ] + } + ] + }, + { + "name": "Test text transformations - convertHiraganaToKatakana", + "originalTextLength": 4, + "dictionaryEntries": [ + { + "type": "term", + "isPrimary": true, + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "frequencyOrder": 0, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 1, + "maxTransformedTextLength": 4, + "headwords": [ + { + "index": 0, + "term": "テキスト", + "reading": "テキスト", + "sources": [ + { + "originalText": "てきすと", + "transformedText": "テキスト", + "deinflectedText": "テキスト", + "matchType": "exact", + "matchSource": "term", + "isPrimary": true + } + ], + "tags": [ + { + "name": "E1", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example tag 1" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + }, + { + "name": "P", + "category": "popular", + "order": 0, + "score": 0, + "content": [ + "popular term" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "wordClasses": [ + "n" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 14, + "score": 1, + "frequencyOrder": 0, + "sequences": [ + 8 + ], + "isPrimary": true, + "tags": [ + { + "name": "n", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "noun" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "text definition 1", + "text definition 2" + ] + } + ], + "pronunciations": [], + "frequencies": [] + } + ] + }, + { + "name": "Test text transformations - convertHalfWidthCharacters, convertKatakanaToHiragana", + "originalTextLength": 2, + "dictionaryEntries": [ + { + "type": "term", + "isPrimary": true, + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 10, + "frequencyOrder": 0, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 0, + "maxTransformedTextLength": 2, + "headwords": [ + { + "index": 0, + "term": "打つ", + "reading": "うつ", + "sources": [ + { + "originalText": "ウツ", + "transformedText": "うつ", + "deinflectedText": "うつ", + "matchType": "exact", + "matchSource": "reading", + "isPrimary": true + } + ], + "tags": [ + { + "name": "E1", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example tag 1" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + }, + { + "name": "P", + "category": "popular", + "order": 0, + "score": 0, + "content": [ + "popular term" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "wordClasses": [ + "v5" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 3, + "score": 10, + "frequencyOrder": 0, + "sequences": [ + 3 + ], + "isPrimary": true, + "tags": [ + { + "name": "vt", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "transitive verb" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "utsu definition 1", + "utsu definition 2" + ] + } + ], + "pronunciations": [], + "frequencies": [ + { + "index": 0, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 2, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 1, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 6, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 2, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 10, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 3, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 0, + "displayValue": "sixteen", + "displayValueParsed": true + }, + { + "index": 4, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 22, + "displayValue": "twenty-two (22)", + "displayValueParsed": true + }, + { + "index": 5, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 28, + "displayValue": null, + "displayValueParsed": false + } + ] + }, + { + "type": "term", + "isPrimary": true, + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "frequencyOrder": 0, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 0, + "maxTransformedTextLength": 2, + "headwords": [ + { + "index": 0, + "term": "打つ", + "reading": "うつ", + "sources": [ + { + "originalText": "ウツ", + "transformedText": "うつ", + "deinflectedText": "うつ", + "matchType": "exact", + "matchSource": "reading", + "isPrimary": true + } + ], + "tags": [ + { + "name": "E2", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example tag 2" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + }, + { + "name": "P", + "category": "popular", + "order": 0, + "score": 0, + "content": [ + "popular term" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "wordClasses": [ + "v5" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 4, + "score": 1, + "frequencyOrder": 0, + "sequences": [ + 3 + ], + "isPrimary": true, + "tags": [ + { + "name": "vt", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "transitive verb" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "utsu definition 3", + "utsu definition 4" + ] + } + ], + "pronunciations": [], + "frequencies": [ + { + "index": 0, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 2, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 1, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": false, + "frequency": 6, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 2, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 10, + "displayValue": null, + "displayValueParsed": false + }, + { + "index": 3, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 0, + "displayValue": "sixteen", + "displayValueParsed": true + }, + { + "index": 4, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 22, + "displayValue": "twenty-two (22)", + "displayValueParsed": true + }, + { + "index": 5, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "hasReading": true, + "frequency": 28, + "displayValue": null, + "displayValueParsed": false + } + ] + } + ] + }, + { + "name": "Test text transformations - collapseEmphaticSequences", + "originalTextLength": 7, + "dictionaryEntries": [ + { + "type": "term", + "isPrimary": true, + "inflectionRuleChainCandidates": [ + { + "source": "algorithm", + "inflectionRules": [] + } + ], + "score": 1, + "frequencyOrder": 0, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 0, + "maxTransformedTextLength": 3, + "headwords": [ + { + "index": 0, + "term": "凄い", + "reading": "すごい", + "sources": [ + { + "originalText": "すっっごーーい", + "transformedText": "すごい", + "deinflectedText": "すごい", + "matchType": "exact", + "matchSource": "reading", + "isPrimary": true + } + ], + "tags": [], + "wordClasses": [ + "adj-i" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 26, + "score": 1, + "frequencyOrder": 0, + "sequences": [ + 18 + ], + "isPrimary": true, + "tags": [ + { + "name": "adj-i", + "category": "default", + "order": 0, + "score": 0, + "content": [], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "sugoi definition" + ] + } + ], + "pronunciations": [], + "frequencies": [] + } + ] } ] \ No newline at end of file -- cgit v1.2.3