aboutsummaryrefslogtreecommitdiff
path: root/test/data/translator-test-results.json
diff options
context:
space:
mode:
authorStefanVukovic99 <stefanvukovic44@gmail.com>2024-02-17 02:45:24 +0100
committerGitHub <noreply@github.com>2024-02-17 01:45:24 +0000
commit4aaa9f15d97668203741c1731f15e710ae8b8294 (patch)
treed1885f7fbd7d1510a71176597169d6847ae26572 /test/data/translator-test-results.json
parent4e77741d22778bd09b772fc53f1cbd64107e3d24 (diff)
add language select, abstract text transformations (#584)
* Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * part1 * frotend done? * fix tests * offscreen and type complications * add tests * start fixing tests * keep fixing tests * fix tests * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * delete pt * renames * add tests * kebab-case filenames * lint * minor fixes * merge * fixes * fix part of comments * fix more comments * delete unused types * comment * comment * do backend * other files * move fetch utils to own file * remove extra line * add extra line * remove unnecessary export * simplify folder structure * remove redundant async * fix param type in api * fix language index * undo changes to cssStyleApplier * undo changes to utilities.js * undo changes to utilities.js * simplify language util * lint * undo phantom changes to anki integration * require textTransformations options * explicit locale in localeCompare * punctuate notes * prefer early exit * rename LanguageOptionsObjectMap * rename to textPreprocessor * tuple with names instead of boolean array * safe data setting * optional chaining * simplify LanguageOptions * encapsulate languages * delete language util * nullable language in text preprocessors controller * rename transform to process * remove settings * make translation advanced again * remove unused getTextTransformations api call * comments * change language types * RIP flags * comments * fix tests * lint * Text preprocessor type changes (#10) * Add types * Update types * Simplify type check * Refactor typing and structuring of language definitions * lint * update translator benchmark * undo markdown changes * undo markdown changes * undo markdown changes * more merge * simplify language controller --------- Co-authored-by: toasted-nutbread <toasted-nutbread@users.noreply.github.com> Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
Diffstat (limited to 'test/data/translator-test-results.json')
-rw-r--r--test/data/translator-test-results.json349
1 files changed, 343 insertions, 6 deletions
diff --git a/test/data/translator-test-results.json b/test/data/translator-test-results.json
index e11cb4a9..cd3f7ab6 100644
--- a/test/data/translator-test-results.json
+++ b/test/data/translator-test-results.json
@@ -3969,6 +3969,174 @@
"displayValueParsed": false
}
]
+ },
+ {
+ "type": "term",
+ "isPrimary": true,
+ "inflectionRuleChainCandidates": [
+ {
+ "source": "algorithm",
+ "inflectionRules": []
+ }
+ ],
+ "score": 1,
+ "frequencyOrder": 0,
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "sourceTermExactMatchCount": 0,
+ "maxTransformedTextLength": 1,
+ "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
+ }
+ ],
+ "wordClasses": [
+ "n"
+ ]
+ }
+ ],
+ "definitions": [
+ {
+ "index": 0,
+ "headwordIndices": [
+ 0
+ ],
+ "dictionary": "Test Dictionary 2",
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "id": 1,
+ "score": 1,
+ "frequencyOrder": 0,
+ "sequences": [
+ 1
+ ],
+ "isPrimary": true,
+ "tags": [
+ {
+ "name": "n",
+ "category": "partOfSpeech",
+ "order": 0,
+ "score": 0,
+ "content": [
+ "noun"
+ ],
+ "dictionaries": [
+ "Test Dictionary 2"
+ ],
+ "redundant": false
+ }
+ ],
+ "entries": [
+ "da definition 1",
+ "da definition 2"
+ ]
+ }
+ ],
+ "pronunciations": [],
+ "frequencies": [
+ {
+ "index": 0,
+ "headwordIndex": 0,
+ "dictionary": "Test Dictionary 2",
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "hasReading": false,
+ "frequency": 1,
+ "displayValue": null,
+ "displayValueParsed": false
+ },
+ {
+ "index": 1,
+ "headwordIndex": 0,
+ "dictionary": "Test Dictionary 2",
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "hasReading": false,
+ "frequency": 0,
+ "displayValue": "four",
+ "displayValueParsed": true
+ },
+ {
+ "index": 2,
+ "headwordIndex": 0,
+ "dictionary": "Test Dictionary 2",
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "hasReading": false,
+ "frequency": 5,
+ "displayValue": "five (5)",
+ "displayValueParsed": true
+ },
+ {
+ "index": 3,
+ "headwordIndex": 0,
+ "dictionary": "Test Dictionary 2",
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "hasReading": true,
+ "frequency": 8,
+ "displayValue": null,
+ "displayValueParsed": false
+ },
+ {
+ "index": 4,
+ "headwordIndex": 0,
+ "dictionary": "Test Dictionary 2",
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "hasReading": true,
+ "frequency": 0,
+ "displayValue": "fourteen",
+ "displayValueParsed": true
+ },
+ {
+ "index": 5,
+ "headwordIndex": 0,
+ "dictionary": "Test Dictionary 2",
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "hasReading": true,
+ "frequency": 20,
+ "displayValue": "twenty (20)",
+ "displayValueParsed": true
+ },
+ {
+ "index": 6,
+ "headwordIndex": 0,
+ "dictionary": "Test Dictionary 2",
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "hasReading": true,
+ "frequency": 26,
+ "displayValue": null,
+ "displayValueParsed": false
+ }
+ ]
}
]
},
@@ -16978,7 +17146,7 @@
]
},
{
- "name": "Test text transformations - convertNumericCharacters",
+ "name": "Test text preprocessors - convertNumericCharacters",
"originalTextLength": 2,
"dictionaryEntries": [
{
@@ -17043,7 +17211,7 @@
]
},
{
- "name": "Test text transformations - convertAlphabeticCharacters",
+ "name": "Test text preprocessors - convertAlphabeticCharacters",
"originalTextLength": 4,
"dictionaryEntries": [
{
@@ -17389,7 +17557,7 @@
]
},
{
- "name": "Test text transformations - convertKatakanaToHiragana",
+ "name": "Test text preprocessors - convertKatakanaToHiragana",
"originalTextLength": 2,
"dictionaryEntries": [
{
@@ -17735,7 +17903,7 @@
]
},
{
- "name": "Test text transformations - convertHiraganaToKatakana",
+ "name": "Test text preprocessors - convertHiraganaToKatakana",
"originalTextLength": 4,
"dictionaryEntries": [
{
@@ -17844,7 +18012,7 @@
]
},
{
- "name": "Test text transformations - convertHalfWidthCharacters, convertKatakanaToHiragana",
+ "name": "Test text preprocessors - convertHalfWidthCharacters, convertKatakanaToHiragana",
"originalTextLength": 2,
"dictionaryEntries": [
{
@@ -18190,7 +18358,7 @@
]
},
{
- "name": "Test text transformations - collapseEmphaticSequences",
+ "name": "Test text preprocessors - collapseEmphaticSequences",
"originalTextLength": 7,
"dictionaryEntries": [
{
@@ -18200,6 +18368,13 @@
{
"source": "algorithm",
"inflectionRules": []
+ },
+ {
+ "source": "algorithm",
+ "inflectionRules": [
+ "adv",
+ "kansai-ben"
+ ]
}
],
"score": 1,
@@ -18267,5 +18442,167 @@
"frequencies": []
}
]
+ },
+ {
+ "name": "Test text preprocessors - capitalizeFirstLetter",
+ "originalTextLength": 7,
+ "dictionaryEntries": [
+ {
+ "type": "term",
+ "isPrimary": true,
+ "inflectionRuleChainCandidates": [
+ {
+ "source": "algorithm",
+ "inflectionRules": []
+ }
+ ],
+ "score": 1,
+ "frequencyOrder": 0,
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "sourceTermExactMatchCount": 1,
+ "maxTransformedTextLength": 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": []
+ }
+ ]
+ },
+ {
+ "name": "Test text preprocessors - decapitalize",
+ "originalTextLength": 8,
+ "dictionaryEntries": [
+ {
+ "type": "term",
+ "isPrimary": true,
+ "inflectionRuleChainCandidates": [
+ {
+ "source": "algorithm",
+ "inflectionRules": []
+ }
+ ],
+ "score": 1,
+ "frequencyOrder": 0,
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "sourceTermExactMatchCount": 1,
+ "maxTransformedTextLength": 8,
+ "headwords": [
+ {
+ "index": 0,
+ "term": "language",
+ "reading": "language",
+ "sources": [
+ {
+ "originalText": "LANGUAGE",
+ "transformedText": "language",
+ "deinflectedText": "language",
+ "matchType": "exact",
+ "matchSource": "term",
+ "isPrimary": true
+ }
+ ],
+ "tags": [],
+ "wordClasses": [
+ "n"
+ ]
+ }
+ ],
+ "definitions": [
+ {
+ "index": 0,
+ "headwordIndices": [
+ 0
+ ],
+ "dictionary": "Test Dictionary 2",
+ "dictionaryIndex": 0,
+ "dictionaryPriority": 0,
+ "id": 28,
+ "score": 1,
+ "frequencyOrder": 0,
+ "sequences": [
+ 20
+ ],
+ "isPrimary": true,
+ "tags": [
+ {
+ "name": "n",
+ "category": "partOfSpeech",
+ "order": 0,
+ "score": 0,
+ "content": [
+ "noun"
+ ],
+ "dictionaries": [
+ "Test Dictionary 2"
+ ],
+ "redundant": false
+ }
+ ],
+ "entries": [
+ "language definition"
+ ]
+ }
+ ],
+ "pronunciations": [],
+ "frequencies": []
+ }
+ ]
}
]