diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-07-18 15:52:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-18 15:52:40 -0400 |
commit | 40cdb4feb534174b78fb5f2ac612748ce9b5a9a4 (patch) | |
tree | b011e0bfe9c9c639ac3f23d94c5a4c3c390cbdb6 /test | |
parent | 637d4a2087b9e93ccd47d689411887b6c40c3992 (diff) |
Update valid-dictionary1 data (#1841)
* Add example definitions for pronunciation metadata
* Update counts
* Update tests
Diffstat (limited to 'test')
-rw-r--r-- | test/data/anki-note-builder-test-results.json | 175 | ||||
-rw-r--r-- | test/data/dictionaries/valid-dictionary1/term_bank_1.json | 7 | ||||
-rw-r--r-- | test/data/translator-test-inputs.json | 35 | ||||
-rw-r--r-- | test/data/translator-test-results-note-data1.json | 926 | ||||
-rw-r--r-- | test/data/translator-test-results.json | 502 | ||||
-rw-r--r-- | test/test-database.js | 4 |
6 files changed, 1646 insertions, 3 deletions
diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json index c10e28a8..00e7965b 100644 --- a/test/data/anki-note-builder-test-results.json +++ b/test/data/anki-note-builder-test-results.json @@ -2536,5 +2536,180 @@ "url": "<a href=\"url:\">url:</a>" } ] + }, + { + "name": "Test pronunciations 1", + "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": "お<ruby>手前<rt>てまえ</rt></ruby>", + "furigana-plain": "お 手前[てまえ]", + "glossary": "<div style=\"text-align: left;\"><i>(n, Test Dictionary 2)</i> otemae definition</div>", + "glossary-brief": "<div style=\"text-align: left;\">otemae definition</div>", + "glossary-no-dictionary": "<div style=\"text-align: left;\"><i>(n)</i> otemae definition</div>", + "part-of-speech": "Noun", + "pitch-accents": "<ol><li><span><span style=\"display:inline-block;position:relative;\">お<span style=\"\"></span></span><span style=\"display:inline-block;position:relative;padding-right:0.1em;margin-right:0.1em;\">て<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;right:-0.1em;height:0.4em;border-right:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;\">ま<span style=\"\"></span></span><span style=\"display:inline-block;position:relative;\">え<span style=\"\"></span></span></span></li><li><span><span style=\"display:inline-block;position:relative;\">お<span style=\"\"></span></span><span style=\"display:inline-block;position:relative;padding-right:0.1em;margin-right:0.1em;\">て<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;right:-0.1em;height:0.4em;border-right:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;\">ま<span style=\"\"></span></span><span style=\"display:inline-block;position:relative;\">え<span style=\"\"></span></span></span></li><li><span><span style=\"display:inline-block;position:relative;\">お<span style=\"\"></span></span><span style=\"display:inline-block;position:relative;\">て<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;\">ま<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;\">え<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;\"></span></span></span></li></ol>", + "pitch-accent-graphs": "<ol><li><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 250 100\" style=\"display:inline-block;height:2em;\">\n <defs>\n <g id=\"term-pitch-accent-graph-dot\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:#000;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-dot-downstep\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:none;stroke:#000;stroke-width:5;\" /><circle cx=\"0\" cy=\"0\" r=\"5\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-triangle\"><path d=\"M0 13 L15 -13 L-15 -13 Z\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n </defs>\n <path style=\"fill:none;stroke:#000;stroke-width:5;\" d=\"M25 75L75 25L125 75L175 75\"></path>\n <path style=\"fill:none;stroke:#000;stroke-width:5;stroke-dasharray:5 5;\" d=\"M175 75 L225 75\"></path>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"25\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-dot-downstep\" x=\"75\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"125\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"175\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-triangle\" x=\"225\" y=\"75\"></use>\n</svg></li><li><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 250 100\" style=\"display:inline-block;height:2em;\">\n <defs>\n <g id=\"term-pitch-accent-graph-dot\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:#000;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-dot-downstep\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:none;stroke:#000;stroke-width:5;\" /><circle cx=\"0\" cy=\"0\" r=\"5\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-triangle\"><path d=\"M0 13 L15 -13 L-15 -13 Z\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n </defs>\n <path style=\"fill:none;stroke:#000;stroke-width:5;\" d=\"M25 75L75 25L125 75L175 75\"></path>\n <path style=\"fill:none;stroke:#000;stroke-width:5;stroke-dasharray:5 5;\" d=\"M175 75 L225 75\"></path>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"25\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-dot-downstep\" x=\"75\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"125\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"175\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-triangle\" x=\"225\" y=\"75\"></use>\n</svg></li><li><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 250 100\" style=\"display:inline-block;height:2em;\">\n <defs>\n <g id=\"term-pitch-accent-graph-dot\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:#000;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-dot-downstep\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:none;stroke:#000;stroke-width:5;\" /><circle cx=\"0\" cy=\"0\" r=\"5\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-triangle\"><path d=\"M0 13 L15 -13 L-15 -13 Z\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n </defs>\n <path style=\"fill:none;stroke:#000;stroke-width:5;\" d=\"M25 75L75 25L125 25L175 25\"></path>\n <path style=\"fill:none;stroke:#000;stroke-width:5;stroke-dasharray:5 5;\" d=\"M175 25 L225 25\"></path>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"25\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"75\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"125\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"175\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-triangle\" x=\"225\" y=\"25\"></use>\n</svg></li></ol>", + "pitch-accent-positions": "<ol><li><span>[2]</span></li><li><span>[2]</span></li><li><span>[0]</span></li></ol>", + "reading": "おてまえ", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefixお手前cloze-suffix", + "sentence-furigana": "cloze-prefixお手前cloze-suffix", + "tags": "n", + "url": "<a href=\"url:\">url:</a>" + } + ] + }, + { + "name": "Test pronunciations 2", + "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": "<ruby>番号<rt>ばんごう</rt></ruby>", + "furigana-plain": "番号[ばんごう]", + "glossary": "<div style=\"text-align: left;\"><i>(n, Test Dictionary 2)</i> bangou definition</div>", + "glossary-brief": "<div style=\"text-align: left;\">bangou definition</div>", + "glossary-no-dictionary": "<div style=\"text-align: left;\"><i>(n)</i> bangou definition</div>", + "part-of-speech": "Noun", + "pitch-accents": "<span><span style=\"display:inline-block;position:relative;\">ば<span style=\"\"></span></span><span style=\"display:inline-block;position:relative;\">ん<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;padding-right:0.1em;margin-right:0.1em;\">ご<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;right:-0.1em;height:0.4em;border-right:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;\">う<span style=\"\"></span></span></span>", + "pitch-accent-graphs": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 250 100\" style=\"display:inline-block;height:2em;\">\n <defs>\n <g id=\"term-pitch-accent-graph-dot\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:#000;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-dot-downstep\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:none;stroke:#000;stroke-width:5;\" /><circle cx=\"0\" cy=\"0\" r=\"5\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-triangle\"><path d=\"M0 13 L15 -13 L-15 -13 Z\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n </defs>\n <path style=\"fill:none;stroke:#000;stroke-width:5;\" d=\"M25 75L75 25L125 25L175 75\"></path>\n <path style=\"fill:none;stroke:#000;stroke-width:5;stroke-dasharray:5 5;\" d=\"M175 75 L225 75\"></path>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"25\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"75\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot-downstep\" x=\"125\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"175\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-triangle\" x=\"225\" y=\"75\"></use>\n</svg>", + "pitch-accent-positions": "<span>[3]</span>", + "reading": "ばんごう", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefix番号cloze-suffix", + "sentence-furigana": "cloze-prefix番号cloze-suffix", + "tags": "n", + "url": "<a href=\"url:\">url:</a>" + } + ] + }, + { + "name": "Test pronunciations 3", + "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": "<ruby>中腰<rt>ちゅうごし</rt></ruby>", + "furigana-plain": "中腰[ちゅうごし]", + "glossary": "<div style=\"text-align: left;\"><i>(n, Test Dictionary 2)</i> chuugoshi definition</div>", + "glossary-brief": "<div style=\"text-align: left;\">chuugoshi definition</div>", + "glossary-no-dictionary": "<div style=\"text-align: left;\"><i>(n)</i> chuugoshi definition</div>", + "part-of-speech": "Noun", + "pitch-accents": "<span><span style=\"display:inline-block;position:relative;\">ちゅ<span style=\"\"></span></span><span style=\"display:inline-block;position:relative;\">う<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;\">ご<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;\">し<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;\"></span></span></span>", + "pitch-accent-graphs": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 250 100\" style=\"display:inline-block;height:2em;\">\n <defs>\n <g id=\"term-pitch-accent-graph-dot\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:#000;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-dot-downstep\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:none;stroke:#000;stroke-width:5;\" /><circle cx=\"0\" cy=\"0\" r=\"5\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-triangle\"><path d=\"M0 13 L15 -13 L-15 -13 Z\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n </defs>\n <path style=\"fill:none;stroke:#000;stroke-width:5;\" d=\"M25 75L75 25L125 25L175 25\"></path>\n <path style=\"fill:none;stroke:#000;stroke-width:5;stroke-dasharray:5 5;\" d=\"M175 25 L225 25\"></path>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"25\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"75\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"125\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"175\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-triangle\" x=\"225\" y=\"25\"></use>\n</svg>", + "pitch-accent-positions": "<span>[0]</span>", + "reading": "ちゅうごし", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefix中腰cloze-suffix", + "sentence-furigana": "cloze-prefix中腰cloze-suffix", + "tags": "n", + "url": "<a href=\"url:\">url:</a>" + } + ] + }, + { + "name": "Test pronunciations 4", + "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": "<ruby>所業<rt>しょぎょう</rt></ruby>", + "furigana-plain": "所業[しょぎょう]", + "glossary": "<div style=\"text-align: left;\"><i>(n, Test Dictionary 2)</i> shogyouu definition</div>", + "glossary-brief": "<div style=\"text-align: left;\">shogyouu definition</div>", + "glossary-no-dictionary": "<div style=\"text-align: left;\"><i>(n)</i> shogyouu definition</div>", + "part-of-speech": "Noun", + "pitch-accents": "<span><span style=\"display:inline-block;position:relative;\">しょ<span style=\"\"></span></span><span style=\"display:inline-block;position:relative;\">ぎょ<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;\">う<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;\"></span></span></span>", + "pitch-accent-graphs": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 200 100\" style=\"display:inline-block;height:2em;\">\n <defs>\n <g id=\"term-pitch-accent-graph-dot\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:#000;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-dot-downstep\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:none;stroke:#000;stroke-width:5;\" /><circle cx=\"0\" cy=\"0\" r=\"5\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-triangle\"><path d=\"M0 13 L15 -13 L-15 -13 Z\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n </defs>\n <path style=\"fill:none;stroke:#000;stroke-width:5;\" d=\"M25 75L75 25L125 25\"></path>\n <path style=\"fill:none;stroke:#000;stroke-width:5;stroke-dasharray:5 5;\" d=\"M125 25 L175 25\"></path>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"25\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"75\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"125\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-triangle\" x=\"175\" y=\"25\"></use>\n</svg>", + "pitch-accent-positions": "<span>[0]</span>", + "reading": "しょぎょう", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefix所業cloze-suffix", + "sentence-furigana": "cloze-prefix所業cloze-suffix", + "tags": "n", + "url": "<a href=\"url:\">url:</a>" + } + ] + }, + { + "name": "Test pronunciations 5", + "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": "<ruby>土木工事<rt>どぼくこうじ</rt></ruby>", + "furigana-plain": "土木工事[どぼくこうじ]", + "glossary": "<div style=\"text-align: left;\"><i>(n, Test Dictionary 2)</i> dobokukouji definition</div>", + "glossary-brief": "<div style=\"text-align: left;\">dobokukouji definition</div>", + "glossary-no-dictionary": "<div style=\"text-align: left;\"><i>(n)</i> dobokukouji definition</div>", + "part-of-speech": "Noun", + "pitch-accents": "<span><span style=\"display:inline-block;position:relative;\">ど<span style=\"\"></span></span><span style=\"display:inline-block;position:relative;\">ぼ<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;\">く<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;padding-right:0.1em;margin-right:0.1em;\">こ<span style=\"display:block;user-select:none;pointer-events:none;position:absolute;top:0.1em;left:0;right:0;height:0;border-top:0.1em solid;right:-0.1em;height:0.4em;border-right:0.1em solid;\"></span></span><span style=\"display:inline-block;position:relative;\">う<span style=\"\"></span></span><span style=\"display:inline-block;position:relative;\">じ<span style=\"\"></span></span></span>", + "pitch-accent-graphs": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 350 100\" style=\"display:inline-block;height:2em;\">\n <defs>\n <g id=\"term-pitch-accent-graph-dot\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:#000;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-dot-downstep\"><circle cx=\"0\" cy=\"0\" r=\"15\" style=\"fill:none;stroke:#000;stroke-width:5;\" /><circle cx=\"0\" cy=\"0\" r=\"5\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n <g id=\"term-pitch-accent-graph-triangle\"><path d=\"M0 13 L15 -13 L-15 -13 Z\" style=\"fill:none;stroke:#000;stroke-width:5;\" /></g>\n </defs>\n <path style=\"fill:none;stroke:#000;stroke-width:5;\" d=\"M25 75L75 25L125 25L175 25L225 75L275 75\"></path>\n <path style=\"fill:none;stroke:#000;stroke-width:5;stroke-dasharray:5 5;\" d=\"M275 75 L325 75\"></path>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"25\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"75\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"125\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot-downstep\" x=\"175\" y=\"25\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"225\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-dot\" x=\"275\" y=\"75\"></use>\n <use href=\"#term-pitch-accent-graph-triangle\" x=\"325\" y=\"75\"></use>\n</svg>", + "pitch-accent-positions": "<span>[4]</span>", + "reading": "どぼくこうじ", + "screenshot": "", + "search-query": "fullQuery", + "selection-text": "", + "sentence": "cloze-prefix土木工事cloze-suffix", + "sentence-furigana": "cloze-prefix土木工事cloze-suffix", + "tags": "n", + "url": "<a href=\"url:\">url:</a>" + } + ] } ]
\ No newline at end of file diff --git a/test/data/dictionaries/valid-dictionary1/term_bank_1.json b/test/data/dictionaries/valid-dictionary1/term_bank_1.json index c58a17bf..1d75f597 100644 --- a/test/data/dictionaries/valid-dictionary1/term_bank_1.json +++ b/test/data/dictionaries/valid-dictionary1/term_bank_1.json @@ -13,6 +13,11 @@ ["読む", "よむ", "vt", "v5", 100, ["to read"], 6, "P E1"], ["強み", "つよみ", "n", "n", 90, ["strong point"], 7, "P E1"], ["テキスト", "テキスト", "n", "n", 1, ["text definition 1", {"type": "text", "text": "text definition 2"}], 8, "P E1"], + ["お手前", "おてまえ", "n", "n", 1, ["otemae definition"], 9, ""], + ["番号", "ばんごう", "n", "n", 1, ["bangou definition"], 10, ""], + ["中腰", "ちゅうごし", "n", "n", 1, ["chuugoshi definition"], 11, ""], + ["所業", "しょぎょう", "n", "n", 1, ["shogyouu definition"], 12, ""], + ["土木工事", "どぼくこうじ", "n", "n", 1, ["dobokukouji definition"], 13, ""], [ "内容", "ないよう", "n", "n", 35, [ @@ -134,6 +139,6 @@ ]} ]} ], - 9, "P E1" + 100, "P E1" ] ]
\ No newline at end of file diff --git a/test/data/translator-test-inputs.json b/test/data/translator-test-inputs.json index 5c47395c..a044d226 100644 --- a/test/data/translator-test-inputs.json +++ b/test/data/translator-test-inputs.json @@ -290,6 +290,41 @@ "mode": "merge", "text": "うちこむ", "options": "default" + }, + { + "name": "Test pronunciations 1", + "func": "findTerms", + "mode": "split", + "text": "お手前", + "options": "default" + }, + { + "name": "Test pronunciations 2", + "func": "findTerms", + "mode": "split", + "text": "番号", + "options": "default" + }, + { + "name": "Test pronunciations 3", + "func": "findTerms", + "mode": "split", + "text": "中腰", + "options": "default" + }, + { + "name": "Test pronunciations 4", + "func": "findTerms", + "mode": "split", + "text": "所業", + "options": "default" + }, + { + "name": "Test pronunciations 5", + "func": "findTerms", + "mode": "split", + "text": "土木工事", + "options": "default" } ] }
\ 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 0b54b0ec..d679287b 100644 --- a/test/data/translator-test-results-note-data1.json +++ b/test/data/translator-test-results-note-data1.json @@ -18541,5 +18541,931 @@ "media": {} } ] + }, + { + "name": "Test pronunciations 1", + "noteDataList": [ + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 15, + "source": "お手前", + "rawSource": "お手前", + "sourceTerm": "お手前", + "reasons": [], + "score": 1, + "isPrimary": true, + "sequence": 9, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "お手前", + "reading": "おてまえ", + "expressions": [ + { + "sourceTerm": "お手前", + "expression": "お手前", + "reading": "おてまえ", + "termTags": [], + "frequencies": [], + "pitches": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "お手前", + "reading": "おてまえ", + "pitches": [ + { + "position": 2, + "tags": [ + { + "name": "P1", + "category": "default", + "notes": "example pitch tag 1", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ] + }, + { + "position": 2, + "tags": [ + { + "name": "P2", + "category": "default", + "notes": "example pitch tag 2", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ] + }, + { + "position": 0, + "tags": [ + { + "name": "P2", + "category": "default", + "notes": "example pitch tag 2", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ] + } + ] + } + ], + "furiganaSegments": [ + { + "text": "お", + "furigana": "" + }, + { + "text": "手前", + "furigana": "てまえ" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "n" + ] + } + ], + "glossary": [ + "otemae definition" + ], + "definitionTags": [ + { + "name": "n", + "category": "partOfSpeech", + "notes": "noun", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [], + "frequencies": [], + "pitches": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "お手前", + "reading": "おてまえ", + "pitches": [ + { + "position": 2, + "tags": [ + { + "name": "P1", + "category": "default", + "notes": "example pitch tag 1", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ] + }, + { + "position": 2, + "tags": [ + { + "name": "P2", + "category": "default", + "notes": "example pitch tag 2", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ] + }, + { + "position": 0, + "tags": [ + { + "name": "P2", + "category": "default", + "notes": "example pitch tag 2", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ] + } + ] + } + ], + "sourceTermExactMatchCount": 1, + "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": [ + { + "dictionary": "Test Dictionary 2", + "pitches": [ + { + "expressions": [ + "お手前" + ], + "reading": "おてまえ", + "position": 2, + "tags": [ + { + "name": "P1", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example pitch tag 1" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "exclusiveExpressions": [], + "exclusiveReadings": [] + }, + { + "expressions": [ + "お手前" + ], + "reading": "おてまえ", + "position": 2, + "tags": [ + { + "name": "P2", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example pitch tag 2" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "exclusiveExpressions": [], + "exclusiveReadings": [] + }, + { + "expressions": [ + "お手前" + ], + "reading": "おてまえ", + "position": 0, + "tags": [ + { + "name": "P2", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example pitch tag 2" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "exclusiveExpressions": [], + "exclusiveReadings": [] + } + ] + } + ], + "pitchCount": 3, + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + } + ] + }, + { + "name": "Test pronunciations 2", + "noteDataList": [ + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 16, + "source": "番号", + "rawSource": "番号", + "sourceTerm": "番号", + "reasons": [], + "score": 1, + "isPrimary": true, + "sequence": 10, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "番号", + "reading": "ばんごう", + "expressions": [ + { + "sourceTerm": "番号", + "expression": "番号", + "reading": "ばんごう", + "termTags": [], + "frequencies": [], + "pitches": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "番号", + "reading": "ばんごう", + "pitches": [ + { + "position": 3, + "tags": [] + } + ] + } + ], + "furiganaSegments": [ + { + "text": "番号", + "furigana": "ばんごう" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "n" + ] + } + ], + "glossary": [ + "bangou definition" + ], + "definitionTags": [ + { + "name": "n", + "category": "partOfSpeech", + "notes": "noun", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [], + "frequencies": [], + "pitches": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "番号", + "reading": "ばんごう", + "pitches": [ + { + "position": 3, + "tags": [] + } + ] + } + ], + "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": [ + { + "dictionary": "Test Dictionary 2", + "pitches": [ + { + "expressions": [ + "番号" + ], + "reading": "ばんごう", + "position": 3, + "tags": [], + "exclusiveExpressions": [], + "exclusiveReadings": [] + } + ] + } + ], + "pitchCount": 1, + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + } + ] + }, + { + "name": "Test pronunciations 3", + "noteDataList": [ + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 17, + "source": "中腰", + "rawSource": "中腰", + "sourceTerm": "中腰", + "reasons": [], + "score": 1, + "isPrimary": true, + "sequence": 11, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "中腰", + "reading": "ちゅうごし", + "expressions": [ + { + "sourceTerm": "中腰", + "expression": "中腰", + "reading": "ちゅうごし", + "termTags": [], + "frequencies": [], + "pitches": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "中腰", + "reading": "ちゅうごし", + "pitches": [ + { + "position": 0, + "tags": [] + } + ] + } + ], + "furiganaSegments": [ + { + "text": "中腰", + "furigana": "ちゅうごし" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "n" + ] + } + ], + "glossary": [ + "chuugoshi definition" + ], + "definitionTags": [ + { + "name": "n", + "category": "partOfSpeech", + "notes": "noun", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [], + "frequencies": [], + "pitches": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "中腰", + "reading": "ちゅうごし", + "pitches": [ + { + "position": 0, + "tags": [] + } + ] + } + ], + "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": [ + { + "dictionary": "Test Dictionary 2", + "pitches": [ + { + "expressions": [ + "中腰" + ], + "reading": "ちゅうごし", + "position": 0, + "tags": [], + "exclusiveExpressions": [], + "exclusiveReadings": [] + } + ] + } + ], + "pitchCount": 1, + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + } + ] + }, + { + "name": "Test pronunciations 4", + "noteDataList": [ + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 18, + "source": "所業", + "rawSource": "所業", + "sourceTerm": "所業", + "reasons": [], + "score": 1, + "isPrimary": true, + "sequence": 12, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "所業", + "reading": "しょぎょう", + "expressions": [ + { + "sourceTerm": "所業", + "expression": "所業", + "reading": "しょぎょう", + "termTags": [], + "frequencies": [], + "pitches": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "所業", + "reading": "しょぎょう", + "pitches": [ + { + "position": 0, + "tags": [] + } + ] + } + ], + "furiganaSegments": [ + { + "text": "所業", + "furigana": "しょぎょう" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "n" + ] + } + ], + "glossary": [ + "shogyouu definition" + ], + "definitionTags": [ + { + "name": "n", + "category": "partOfSpeech", + "notes": "noun", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [], + "frequencies": [], + "pitches": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "所業", + "reading": "しょぎょう", + "pitches": [ + { + "position": 0, + "tags": [] + } + ] + } + ], + "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": [ + { + "dictionary": "Test Dictionary 2", + "pitches": [ + { + "expressions": [ + "所業" + ], + "reading": "しょぎょう", + "position": 0, + "tags": [], + "exclusiveExpressions": [], + "exclusiveReadings": [] + } + ] + } + ], + "pitchCount": 1, + "context": { + "query": "query", + "fullQuery": "fullQuery", + "document": { + "title": "title" + } + }, + "media": {} + } + ] + }, + { + "name": "Test pronunciations 5", + "noteDataList": [ + { + "marker": "{marker}", + "definition": { + "type": "term", + "id": 19, + "source": "土木工事", + "rawSource": "土木工事", + "sourceTerm": "土木工事", + "reasons": [], + "score": 1, + "isPrimary": true, + "sequence": 13, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "dictionaryNames": [ + "Test Dictionary 2" + ], + "expression": "土木工事", + "reading": "どぼくこうじ", + "expressions": [ + { + "sourceTerm": "土木工事", + "expression": "土木工事", + "reading": "どぼくこうじ", + "termTags": [], + "frequencies": [], + "pitches": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "土木工事", + "reading": "どぼくこうじ", + "pitches": [ + { + "position": 4, + "tags": [] + } + ] + } + ], + "furiganaSegments": [ + { + "text": "土木工事", + "furigana": "どぼくこうじ" + } + ], + "termFrequency": "normal", + "wordClasses": [ + "n" + ] + } + ], + "glossary": [ + "dobokukouji definition" + ], + "definitionTags": [ + { + "name": "n", + "category": "partOfSpeech", + "notes": "noun", + "order": 0, + "score": 0, + "dictionary": "Test Dictionary 2", + "redundant": false + } + ], + "termTags": [], + "frequencies": [], + "pitches": [ + { + "index": 0, + "expressionIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryOrder": { + "index": 0, + "priority": 0 + }, + "expression": "土木工事", + "reading": "どぼくこうじ", + "pitches": [ + { + "position": 4, + "tags": [] + } + ] + } + ], + "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": [ + { + "dictionary": "Test Dictionary 2", + "pitches": [ + { + "expressions": [ + "土木工事" + ], + "reading": "どぼくこうじ", + "position": 4, + "tags": [], + "exclusiveExpressions": [], + "exclusiveReadings": [] + } + ] + } + ], + "pitchCount": 1, + "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 3ef1999f..0ba82690 100644 --- a/test/data/translator-test-results.json +++ b/test/data/translator-test-results.json @@ -11229,5 +11229,507 @@ ] } ] + }, + { + "name": "Test pronunciations 1", + "originalTextLength": 3, + "dictionaryEntries": [ + { + "type": "term", + "isPrimary": true, + "inflections": [], + "score": 1, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 1, + "maxTransformedTextLength": 3, + "headwords": [ + { + "index": 0, + "term": "お手前", + "reading": "おてまえ", + "sources": [ + { + "originalText": "お手前", + "transformedText": "お手前", + "deinflectedText": "お手前", + "isPrimary": true + } + ], + "tags": [], + "wordClasses": [ + "n" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 15, + "score": 1, + "sequences": [ + 9 + ], + "isPrimary": true, + "tags": [ + { + "name": "n", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "noun" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "otemae definition" + ] + } + ], + "pronunciations": [ + { + "index": 0, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "pitches": [ + { + "position": 2, + "nasalPositions": [], + "devoicePositions": [], + "tags": [ + { + "name": "P1", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example pitch tag 1" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ] + }, + { + "position": 2, + "nasalPositions": [], + "devoicePositions": [], + "tags": [ + { + "name": "P2", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example pitch tag 2" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ] + }, + { + "position": 0, + "nasalPositions": [], + "devoicePositions": [], + "tags": [ + { + "name": "P2", + "category": "default", + "order": 0, + "score": 0, + "content": [ + "example pitch tag 2" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ] + } + ] + } + ], + "frequencies": [] + } + ] + }, + { + "name": "Test pronunciations 2", + "originalTextLength": 2, + "dictionaryEntries": [ + { + "type": "term", + "isPrimary": true, + "inflections": [], + "score": 1, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 1, + "maxTransformedTextLength": 2, + "headwords": [ + { + "index": 0, + "term": "番号", + "reading": "ばんごう", + "sources": [ + { + "originalText": "番号", + "transformedText": "番号", + "deinflectedText": "番号", + "isPrimary": true + } + ], + "tags": [], + "wordClasses": [ + "n" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 16, + "score": 1, + "sequences": [ + 10 + ], + "isPrimary": true, + "tags": [ + { + "name": "n", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "noun" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "bangou definition" + ] + } + ], + "pronunciations": [ + { + "index": 0, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "pitches": [ + { + "position": 3, + "nasalPositions": [ + 3 + ], + "devoicePositions": [], + "tags": [] + } + ] + } + ], + "frequencies": [] + } + ] + }, + { + "name": "Test pronunciations 3", + "originalTextLength": 2, + "dictionaryEntries": [ + { + "type": "term", + "isPrimary": true, + "inflections": [], + "score": 1, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 1, + "maxTransformedTextLength": 2, + "headwords": [ + { + "index": 0, + "term": "中腰", + "reading": "ちゅうごし", + "sources": [ + { + "originalText": "中腰", + "transformedText": "中腰", + "deinflectedText": "中腰", + "isPrimary": true + } + ], + "tags": [], + "wordClasses": [ + "n" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 17, + "score": 1, + "sequences": [ + 11 + ], + "isPrimary": true, + "tags": [ + { + "name": "n", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "noun" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "chuugoshi definition" + ] + } + ], + "pronunciations": [ + { + "index": 0, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "pitches": [ + { + "position": 0, + "nasalPositions": [ + 3 + ], + "devoicePositions": [], + "tags": [] + } + ] + } + ], + "frequencies": [] + } + ] + }, + { + "name": "Test pronunciations 4", + "originalTextLength": 2, + "dictionaryEntries": [ + { + "type": "term", + "isPrimary": true, + "inflections": [], + "score": 1, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 1, + "maxTransformedTextLength": 2, + "headwords": [ + { + "index": 0, + "term": "所業", + "reading": "しょぎょう", + "sources": [ + { + "originalText": "所業", + "transformedText": "所業", + "deinflectedText": "所業", + "isPrimary": true + } + ], + "tags": [], + "wordClasses": [ + "n" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 18, + "score": 1, + "sequences": [ + 12 + ], + "isPrimary": true, + "tags": [ + { + "name": "n", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "noun" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "shogyouu definition" + ] + } + ], + "pronunciations": [ + { + "index": 0, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "pitches": [ + { + "position": 0, + "nasalPositions": [ + 2 + ], + "devoicePositions": [], + "tags": [] + } + ] + } + ], + "frequencies": [] + } + ] + }, + { + "name": "Test pronunciations 5", + "originalTextLength": 4, + "dictionaryEntries": [ + { + "type": "term", + "isPrimary": true, + "inflections": [], + "score": 1, + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "sourceTermExactMatchCount": 1, + "maxTransformedTextLength": 4, + "headwords": [ + { + "index": 0, + "term": "土木工事", + "reading": "どぼくこうじ", + "sources": [ + { + "originalText": "土木工事", + "transformedText": "土木工事", + "deinflectedText": "土木工事", + "isPrimary": true + } + ], + "tags": [], + "wordClasses": [ + "n" + ] + } + ], + "definitions": [ + { + "index": 0, + "headwordIndices": [ + 0 + ], + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "id": 19, + "score": 1, + "sequences": [ + 13 + ], + "isPrimary": true, + "tags": [ + { + "name": "n", + "category": "partOfSpeech", + "order": 0, + "score": 0, + "content": [ + "noun" + ], + "dictionaries": [ + "Test Dictionary 2" + ], + "redundant": false + } + ], + "entries": [ + "dobokukouji definition" + ] + } + ], + "pronunciations": [ + { + "index": 0, + "headwordIndex": 0, + "dictionary": "Test Dictionary 2", + "dictionaryIndex": 0, + "dictionaryPriority": 0, + "pitches": [ + { + "position": 4, + "nasalPositions": [], + "devoicePositions": [ + 3 + ], + "tags": [] + } + ] + } + ], + "frequencies": [] + } + ] } ]
\ No newline at end of file diff --git a/test/test-database.js b/test/test-database.js index 6a980042..f8b93505 100644 --- a/test/test-database.js +++ b/test/test-database.js @@ -162,8 +162,8 @@ async function testDatabase1() { true ); vm.assert.deepStrictEqual(counts, { - counts: [{kanji: 2, kanjiMeta: 2, terms: 15, termMeta: 16, tagMeta: 15, media: 2}], - total: {kanji: 2, kanjiMeta: 2, terms: 15, termMeta: 16, tagMeta: 15, media: 2} + counts: [{kanji: 2, kanjiMeta: 2, terms: 20, termMeta: 16, tagMeta: 15, media: 2}], + total: {kanji: 2, kanjiMeta: 2, terms: 20, termMeta: 16, tagMeta: 15, media: 2} }); // Test find* functions |