diff options
-rw-r--r-- | test/data/translator-test-results-note-data1.json | 1769 | ||||
-rw-r--r-- | test/test-translator.js | 2 |
2 files changed, 2 insertions, 1769 deletions
diff --git a/test/data/translator-test-results-note-data1.json b/test/data/translator-test-results-note-data1.json index 1126e1f6..b8b53a55 100644 --- a/test/data/translator-test-results-note-data1.json +++ b/test/data/translator-test-results-note-data1.json @@ -8543,1774 +8543,7 @@ }, { "name": "Search using different modes", - "noteDataList": [ - { - "marker": "{marker}", - "definition": { - "type": "term", - "id": 7, - "source": "打ち込む", - "rawSource": "打ち込む", - "sourceTerm": "打ち込む", - "reasons": [], - "score": 10, - "isPrimary": true, - "sequence": 4, - "dictionary": "Test Dictionary 2", - "dictionaryOrder": { - "index": 0, - "priority": 0 - }, - "dictionaryNames": [ - "Test Dictionary 2" - ], - "expression": "打ち込む", - "reading": "うちこむ", - "expressions": [ - { - "sourceTerm": "打ち込む", - "expression": "打ち込む", - "reading": "うちこむ", - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "furiganaSegments": [ - { - "text": "打", - "furigana": "う" - }, - { - "text": "ち", - "furigana": "" - }, - { - "text": "込", - "furigana": "こ" - }, - { - "text": "む", - "furigana": "" - } - ], - "termFrequency": "normal" - } - ], - "glossary": [ - "definition13", - "definition14" - ], - "definitionTags": [ - { - "name": "tag1", - "category": "category1", - "notes": "tag1 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag2", - "category": "category2", - "notes": "tag2 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "sourceTermExactMatchCount": 1, - "screenshotFileName": null, - "clipboardImageFileName": null, - "clipboardText": null, - "audioFileName": null, - "url": "url:", - "cloze": { - "sentence": "", - "prefix": "", - "body": "", - "suffix": "" - }, - "furiganaSegments": [ - { - "text": "打", - "furigana": "う" - }, - { - "text": "ち", - "furigana": "" - }, - { - "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, - "context": { - "document": { - "title": "title" - } - } - }, - { - "marker": "{marker}", - "definition": { - "type": "term", - "id": 9, - "source": "打ち込む", - "rawSource": "打ち込む", - "sourceTerm": "打ち込む", - "reasons": [], - "score": 10, - "isPrimary": true, - "sequence": 4, - "dictionary": "Test Dictionary 2", - "dictionaryOrder": { - "index": 0, - "priority": 0 - }, - "dictionaryNames": [ - "Test Dictionary 2" - ], - "expression": "打ち込む", - "reading": "ぶちこむ", - "expressions": [ - { - "sourceTerm": "打ち込む", - "expression": "打ち込む", - "reading": "ぶちこむ", - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "furiganaSegments": [ - { - "text": "打", - "furigana": "ぶ" - }, - { - "text": "ち", - "furigana": "" - }, - { - "text": "込", - "furigana": "こ" - }, - { - "text": "む", - "furigana": "" - } - ], - "termFrequency": "normal" - } - ], - "glossary": [ - "definition17", - "definition18" - ], - "definitionTags": [ - { - "name": "tag1", - "category": "category1", - "notes": "tag1 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag2", - "category": "category2", - "notes": "tag2 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "sourceTermExactMatchCount": 1, - "screenshotFileName": null, - "clipboardImageFileName": null, - "clipboardText": null, - "audioFileName": null, - "url": "url:", - "cloze": { - "sentence": "", - "prefix": "", - "body": "", - "suffix": "" - }, - "furiganaSegments": [ - { - "text": "打", - "furigana": "ぶ" - }, - { - "text": "ち", - "furigana": "" - }, - { - "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, - "context": { - "document": { - "title": "title" - } - } - }, - { - "marker": "{marker}", - "definition": { - "type": "term", - "id": 8, - "source": "打ち込む", - "rawSource": "打ち込む", - "sourceTerm": "打ち込む", - "reasons": [], - "score": 1, - "isPrimary": true, - "sequence": 4, - "dictionary": "Test Dictionary 2", - "dictionaryOrder": { - "index": 0, - "priority": 0 - }, - "dictionaryNames": [ - "Test Dictionary 2" - ], - "expression": "打ち込む", - "reading": "うちこむ", - "expressions": [ - { - "sourceTerm": "打ち込む", - "expression": "打ち込む", - "reading": "うちこむ", - "termTags": [ - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag6", - "category": "default", - "notes": "", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag7", - "category": "default", - "notes": "", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "furiganaSegments": [ - { - "text": "打", - "furigana": "う" - }, - { - "text": "ち", - "furigana": "" - }, - { - "text": "込", - "furigana": "こ" - }, - { - "text": "む", - "furigana": "" - } - ], - "termFrequency": "normal" - } - ], - "glossary": [ - "definition15", - "definition16" - ], - "definitionTags": [ - { - "name": "tag1", - "category": "category1", - "notes": "tag1 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag2", - "category": "category2", - "notes": "tag2 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "termTags": [ - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag6", - "category": "default", - "notes": "", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag7", - "category": "default", - "notes": "", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "sourceTermExactMatchCount": 1, - "screenshotFileName": null, - "clipboardImageFileName": null, - "clipboardText": null, - "audioFileName": null, - "url": "url:", - "cloze": { - "sentence": "", - "prefix": "", - "body": "", - "suffix": "" - }, - "furiganaSegments": [ - { - "text": "打", - "furigana": "う" - }, - { - "text": "ち", - "furigana": "" - }, - { - "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, - "context": { - "document": { - "title": "title" - } - } - }, - { - "marker": "{marker}", - "definition": { - "type": "term", - "id": 10, - "source": "打ち込む", - "rawSource": "打ち込む", - "sourceTerm": "打ち込む", - "reasons": [], - "score": 1, - "isPrimary": true, - "sequence": 4, - "dictionary": "Test Dictionary 2", - "dictionaryOrder": { - "index": 0, - "priority": 0 - }, - "dictionaryNames": [ - "Test Dictionary 2" - ], - "expression": "打ち込む", - "reading": "ぶちこむ", - "expressions": [ - { - "sourceTerm": "打ち込む", - "expression": "打ち込む", - "reading": "ぶちこむ", - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "furiganaSegments": [ - { - "text": "打", - "furigana": "ぶ" - }, - { - "text": "ち", - "furigana": "" - }, - { - "text": "込", - "furigana": "こ" - }, - { - "text": "む", - "furigana": "" - } - ], - "termFrequency": "normal" - } - ], - "glossary": [ - "definition19", - "definition20" - ], - "definitionTags": [ - { - "name": "tag1", - "category": "category1", - "notes": "tag1 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag2", - "category": "category2", - "notes": "tag2 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "sourceTermExactMatchCount": 1, - "screenshotFileName": null, - "clipboardImageFileName": null, - "clipboardText": null, - "audioFileName": null, - "url": "url:", - "cloze": { - "sentence": "", - "prefix": "", - "body": "", - "suffix": "" - }, - "furiganaSegments": [ - { - "text": "打", - "furigana": "ぶ" - }, - { - "text": "ち", - "furigana": "" - }, - { - "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, - "context": { - "document": { - "title": "title" - } - } - }, - { - "marker": "{marker}", - "definition": { - "type": "term", - "id": 3, - "source": "打ち", - "rawSource": "打ち", - "sourceTerm": "打つ", - "reasons": [ - "masu stem" - ], - "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": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "furiganaSegments": [ - { - "text": "打", - "furigana": "う" - }, - { - "text": "つ", - "furigana": "" - } - ], - "termFrequency": "normal" - } - ], - "glossary": [ - "definition5", - "definition6" - ], - "definitionTags": [ - { - "name": "tag1", - "category": "category1", - "notes": "tag1 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag2", - "category": "category2", - "notes": "tag2 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "sourceTermExactMatchCount": 1, - "screenshotFileName": null, - "clipboardImageFileName": null, - "clipboardText": null, - "audioFileName": null, - "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, - "context": { - "document": { - "title": "title" - } - } - }, - { - "marker": "{marker}", - "definition": { - "type": "term", - "id": 5, - "source": "打ち", - "rawSource": "打ち", - "sourceTerm": "打つ", - "reasons": [ - "masu stem" - ], - "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": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "furiganaSegments": [ - { - "text": "打", - "furigana": "ぶ" - }, - { - "text": "つ", - "furigana": "" - } - ], - "termFrequency": "normal" - } - ], - "glossary": [ - "definition9", - "definition10" - ], - "definitionTags": [ - { - "name": "tag1", - "category": "category1", - "notes": "tag1 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag2", - "category": "category2", - "notes": "tag2 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "sourceTermExactMatchCount": 1, - "screenshotFileName": null, - "clipboardImageFileName": null, - "clipboardText": null, - "audioFileName": null, - "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, - "context": { - "document": { - "title": "title" - } - } - }, - { - "marker": "{marker}", - "definition": { - "type": "term", - "id": 4, - "source": "打ち", - "rawSource": "打ち", - "sourceTerm": "打つ", - "reasons": [ - "masu stem" - ], - "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": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "furiganaSegments": [ - { - "text": "打", - "furigana": "う" - }, - { - "text": "つ", - "furigana": "" - } - ], - "termFrequency": "normal" - } - ], - "glossary": [ - "definition7", - "definition8" - ], - "definitionTags": [ - { - "name": "tag1", - "category": "category1", - "notes": "tag1 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag2", - "category": "category2", - "notes": "tag2 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "sourceTermExactMatchCount": 1, - "screenshotFileName": null, - "clipboardImageFileName": null, - "clipboardText": null, - "audioFileName": null, - "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, - "context": { - "document": { - "title": "title" - } - } - }, - { - "marker": "{marker}", - "definition": { - "type": "term", - "id": 6, - "source": "打ち", - "rawSource": "打ち", - "sourceTerm": "打つ", - "reasons": [ - "masu stem" - ], - "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": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "furiganaSegments": [ - { - "text": "打", - "furigana": "ぶ" - }, - { - "text": "つ", - "furigana": "" - } - ], - "termFrequency": "normal" - } - ], - "glossary": [ - "definition11", - "definition12" - ], - "definitionTags": [ - { - "name": "tag1", - "category": "category1", - "notes": "tag1 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag2", - "category": "category2", - "notes": "tag2 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "sourceTermExactMatchCount": 1, - "screenshotFileName": null, - "clipboardImageFileName": null, - "clipboardText": null, - "audioFileName": null, - "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, - "context": { - "document": { - "title": "title" - } - } - }, - { - "marker": "{marker}", - "definition": { - "type": "term", - "id": 1, - "source": "打", - "rawSource": "打", - "sourceTerm": "打", - "reasons": [], - "score": 1, - "isPrimary": true, - "sequence": 1, - "dictionary": "Test Dictionary 2", - "dictionaryOrder": { - "index": 0, - "priority": 0 - }, - "dictionaryNames": [ - "Test Dictionary 2" - ], - "expression": "打", - "reading": "だ", - "expressions": [ - { - "sourceTerm": "打", - "expression": "打", - "reading": "だ", - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "furiganaSegments": [ - { - "text": "打", - "furigana": "だ" - } - ], - "termFrequency": "normal" - } - ], - "glossary": [ - "definition1", - "definition2" - ], - "definitionTags": [ - { - "name": "tag1", - "category": "category1", - "notes": "tag1 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag2", - "category": "category2", - "notes": "tag2 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "sourceTermExactMatchCount": 1, - "screenshotFileName": null, - "clipboardImageFileName": null, - "clipboardText": null, - "audioFileName": null, - "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, - "context": { - "document": { - "title": "title" - } - } - }, - { - "marker": "{marker}", - "definition": { - "type": "term", - "id": 2, - "source": "打", - "rawSource": "打", - "sourceTerm": "打", - "reasons": [], - "score": 1, - "isPrimary": true, - "sequence": 2, - "dictionary": "Test Dictionary 2", - "dictionaryOrder": { - "index": 0, - "priority": 0 - }, - "dictionaryNames": [ - "Test Dictionary 2" - ], - "expression": "打", - "reading": "ダース", - "expressions": [ - { - "sourceTerm": "打", - "expression": "打", - "reading": "ダース", - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "furiganaSegments": [ - { - "text": "打", - "furigana": "ダース" - } - ], - "termFrequency": "normal" - } - ], - "glossary": [ - "definition3", - "definition4" - ], - "definitionTags": [ - { - "name": "tag1", - "category": "category1", - "notes": "tag1 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag2", - "category": "category2", - "notes": "tag2 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "termTags": [ - { - "name": "tag3", - "category": "category3", - "notes": "tag3 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag4", - "category": "category4", - "notes": "tag4 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - }, - { - "name": "tag5", - "category": "category5", - "notes": "tag5 notes", - "order": 0, - "score": 0, - "dictionary": "Test Dictionary 2", - "redundant": false - } - ], - "frequencies": [], - "pitches": [], - "sourceTermExactMatchCount": 1, - "screenshotFileName": null, - "clipboardImageFileName": null, - "clipboardText": null, - "audioFileName": null, - "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, - "context": { - "document": { - "title": "title" - } - } - } - ] + "noteDataList": null }, { "name": "Search using different modes", diff --git a/test/test-translator.js b/test/test-translator.js index 1d2cfb9d..027fc4f5 100644 --- a/test/test-translator.js +++ b/test/test-translator.js @@ -184,7 +184,7 @@ async function main() { const {name, mode, text} = test; const options = buildOptions(optionsPresets, test.options, title); const [definitions, length] = clone(await translator.findTerms(mode, text, options)); - const noteDataList = clone(definitions.map((definition) => createTestAnkiNoteData(clone(definition), mode))); + const noteDataList = mode !== 'simple' ? clone(definitions.map((definition) => createTestAnkiNoteData(clone(definition), mode))) : null; actualResults1.push({name, length, definitions}); actualResults2.push({name, noteDataList}); if (!write) { |