From d19b898792bffed8ab2d5724472e5b65a5f5b146 Mon Sep 17 00:00:00 2001 From: StefanVukovic99 Date: Wed, 22 May 2024 22:45:39 +0200 Subject: [ja] add preprocessor for width of alphabetic characters (#964) * add japanese text preprocessor for variants in width of alphabetic characters * try combining with numeric to improve performance * Update ext/js/language/ja/japanese.js Co-authored-by: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Signed-off-by: StefanVukovic99 * Update ext/js/language/ja/japanese.js Co-authored-by: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Signed-off-by: StefanVukovic99 * fix tests --------- Signed-off-by: StefanVukovic99 Co-authored-by: Kuuuube <61125188+Kuuuube@users.noreply.github.com> --- test/data/translator-test-inputs.json | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'test/data/translator-test-inputs.json') diff --git a/test/data/translator-test-inputs.json b/test/data/translator-test-inputs.json index 9f508a1d..ed028273 100644 --- a/test/data/translator-test-inputs.json +++ b/test/data/translator-test-inputs.json @@ -369,7 +369,33 @@ ] }, { - "name": "Test text preprocessors - convertAlphabeticCharacters", + "name": "Test text preprocessors - alphabeticWidthVariants 1", + "func": "findTerms", + "mode": "split", + "text": "English", + "options": [ + "default", + { + "type": "terms", + "removeNonJapaneseCharacters": false + } + ] + }, + { + "name": "Test text preprocessors - alphabeticWidthVariants 2", + "func": "findTerms", + "mode": "split", + "text": "USB", + "options": [ + "default", + { + "type": "terms", + "removeNonJapaneseCharacters": false + } + ] + }, + { + "name": "Test text preprocessors - alphabeticToHiragana", "func": "findTerms", "mode": "split", "text": "utsu", -- cgit v1.2.3