aboutsummaryrefslogtreecommitdiff
path: root/test/data
diff options
context:
space:
mode:
Diffstat (limited to 'test/data')
-rw-r--r--test/data/anki-note-builder-test-results.json46
-rw-r--r--test/data/translator-test-inputs.json15
-rw-r--r--test/data/translator-test-results-note-data1.json114
-rw-r--r--test/data/translator-test-results.json81
4 files changed, 256 insertions, 0 deletions
diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json
index 0e51b4aa..49e0d8fe 100644
--- a/test/data/anki-note-builder-test-results.json
+++ b/test/data/anki-note-builder-test-results.json
@@ -4361,5 +4361,51 @@
"url": "<a href=\"url:\">url:</a>"
}
]
+ },
+ {
+ "name": "Test search resolution - word",
+ "results": [
+ {
+ "audio": "",
+ "clipboard-image": "",
+ "clipboard-text": "",
+ "cloze-body": "english",
+ "cloze-body-kana": "english",
+ "cloze-prefix": "cloze-prefix",
+ "cloze-suffix": "cloze-suffix",
+ "conjugation": "",
+ "dictionary": "Test Dictionary 2",
+ "document-title": "title",
+ "expression": "English",
+ "frequencies": "",
+ "frequency-harmonic-rank": "9999999",
+ "frequency-harmonic-occurrence": "0",
+ "frequency-average-rank": "9999999",
+ "frequency-average-occurrence": "0",
+ "furigana": "English",
+ "furigana-plain": "English",
+ "glossary": "<div style=\"text-align: left;\"><i>(n, Test Dictionary 2)</i> English definition</div>",
+ "glossary-brief": "<div style=\"text-align: left;\">English definition</div>",
+ "glossary-no-dictionary": "<div style=\"text-align: left;\"><i>(n)</i> English definition</div>",
+ "glossary-first": "<div style=\"text-align: left;\"><i>(n, Test Dictionary 2)</i> English definition</div>",
+ "glossary-first-brief": "<div style=\"text-align: left;\">English definition</div>",
+ "glossary-first-no-dictionary": "<div style=\"text-align: left;\"><i>(n)</i> English definition</div>",
+ "part-of-speech": "Noun",
+ "pitch-accents": "No pitch accent data",
+ "pitch-accent-graphs": "No pitch accent data",
+ "pitch-accent-graphs-jj": "No pitch accent data",
+ "pitch-accent-positions": "No pitch accent data",
+ "pitch-accent-categories": "",
+ "phonetic-transcriptions": "",
+ "reading": "English",
+ "screenshot": "",
+ "search-query": "fullQuery",
+ "selection-text": "",
+ "sentence": "cloze-prefixenglishcloze-suffix",
+ "sentence-furigana": "cloze-prefixenglishcloze-suffix",
+ "tags": "n",
+ "url": "<a href=\"url:\">url:</a>"
+ }
+ ]
}
]
diff --git a/test/data/translator-test-inputs.json b/test/data/translator-test-inputs.json
index b7a84d7e..9f508a1d 100644
--- a/test/data/translator-test-inputs.json
+++ b/test/data/translator-test-inputs.json
@@ -470,6 +470,21 @@
"removeNonJapaneseCharacters": false
}
]
+ },
+ {
+ "name": "Test search resolution - word",
+ "func": "findTerms",
+ "mode": "split",
+ "text": "english example",
+ "options": [
+ "default",
+ {
+ "type": "terms",
+ "language": "en",
+ "removeNonJapaneseCharacters": false,
+ "searchResolution": "word"
+ }
+ ]
}
]
}
diff --git a/test/data/translator-test-results-note-data1.json b/test/data/translator-test-results-note-data1.json
index eeb348af..0782c8f5 100644
--- a/test/data/translator-test-results-note-data1.json
+++ b/test/data/translator-test-results-note-data1.json
@@ -33056,5 +33056,119 @@
"media": {}
}
]
+ },
+ {
+ "name": "Test search resolution - word",
+ "noteDataList": [
+ {
+ "marker": "{marker}",
+ "definition": {
+ "type": "term",
+ "id": 27,
+ "source": "English",
+ "rawSource": "english",
+ "sourceTerm": "English",
+ "inflectionRuleChainCandidates": [
+ {
+ "source": "algorithm",
+ "inflectionRules": []
+ }
+ ],
+ "score": 1,
+ "isPrimary": true,
+ "sequence": 19,
+ "dictionary": "Test Dictionary 2",
+ "dictionaryOrder": {
+ "index": 0,
+ "priority": 0
+ },
+ "dictionaryNames": [
+ "Test Dictionary 2"
+ ],
+ "expression": "English",
+ "reading": "English",
+ "expressions": [
+ {
+ "sourceTerm": "English",
+ "expression": "English",
+ "reading": "English",
+ "termTags": [],
+ "frequencies": [],
+ "pitches": [],
+ "furiganaSegments": [
+ {
+ "text": "English",
+ "furigana": ""
+ }
+ ],
+ "termFrequency": "normal",
+ "wordClasses": [
+ "n"
+ ]
+ }
+ ],
+ "glossary": [
+ "English definition"
+ ],
+ "definitionTags": [
+ {
+ "name": "n",
+ "category": "partOfSpeech",
+ "notes": "noun",
+ "order": 0,
+ "score": 0,
+ "dictionary": "Test Dictionary 2",
+ "redundant": false
+ }
+ ],
+ "termTags": [],
+ "frequencies": [],
+ "frequencyHarmonic": -1,
+ "frequencyAverage": -1,
+ "pitches": [],
+ "phoneticTranscriptions": [],
+ "sourceTermExactMatchCount": 1,
+ "url": "url:",
+ "cloze": {
+ "sentence": "",
+ "prefix": "",
+ "body": "",
+ "bodyKana": "",
+ "suffix": ""
+ },
+ "furiganaSegments": [
+ {
+ "text": "English",
+ "furigana": ""
+ }
+ ]
+ },
+ "glossaryLayoutMode": "default",
+ "compactTags": false,
+ "group": false,
+ "merge": false,
+ "modeTermKanji": false,
+ "modeTermKana": false,
+ "modeKanji": false,
+ "compactGlossaries": false,
+ "uniqueExpressions": [
+ "English"
+ ],
+ "uniqueReadings": [
+ "English"
+ ],
+ "pitches": [],
+ "pitchCount": 0,
+ "phoneticTranscriptions": [],
+ "context": {
+ "query": "query",
+ "fullQuery": "fullQuery",
+ "document": {
+ "title": "title"
+ }
+ },
+ "media": {}
+ }
+ ]
}
]
diff --git a/test/data/translator-test-results.json b/test/data/translator-test-results.json
index af5ceff7..bc26e0f9 100644
--- a/test/data/translator-test-results.json
+++ b/test/data/translator-test-results.json
@@ -18685,5 +18685,86 @@
"frequencies": []
}
]
+ },
+ {
+ "name": "Test search resolution - word",
+ "originalTextLength": 7,
+ "dictionaryEntries": [
+ {
+ "type": "term",
+ "isPrimary": true,
+ "inflectionRuleChainCandidates": [
+ {
+ "source": "algorithm",
+ "inflectionRules": []
+ }
+ ],
+ "score": 1,
+ "frequencyOrder": 0,
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "sourceTermExactMatchCount": 1,
+ "maxOriginalTextLength": 7,
+ "headwords": [
+ {
+ "index": 0,
+ "term": "English",
+ "reading": "English",
+ "sources": [
+ {
+ "originalText": "english",
+ "transformedText": "English",
+ "deinflectedText": "English",
+ "matchType": "exact",
+ "matchSource": "term",
+ "isPrimary": true
+ }
+ ],
+ "tags": [],
+ "wordClasses": [
+ "n"
+ ]
+ }
+ ],
+ "definitions": [
+ {
+ "index": 0,
+ "headwordIndices": [
+ 0
+ ],
+ "dictionary": "Test Dictionary 2",
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "id": 27,
+ "score": 1,
+ "frequencyOrder": 0,
+ "sequences": [
+ 19
+ ],
+ "isPrimary": true,
+ "tags": [
+ {
+ "name": "n",
+ "category": "partOfSpeech",
+ "order": 0,
+ "score": 0,
+ "content": [
+ "noun"
+ ],
+ "dictionaries": [
+ "Test Dictionary 2"
+ ],
+ "redundant": false
+ }
+ ],
+ "entries": [
+ "English definition"
+ ]
+ }
+ ],
+ "pronunciations": [],
+ "frequencies": []
+ }
+ ]
}
]