From ea53ab5c59b33a30ab3cfb92c3a8a7624ab7f3ae Mon Sep 17 00:00:00 2001
From: Kuuuube <61125188+Kuuuube@users.noreply.github.com>
Date: Sat, 3 Feb 2024 23:10:43 -0500
Subject: [PATCH 1/6] Add documentation for new frequency handlebars (#621)
* Add documentation for new frequency handlebars
* Roughly mark default meanings
* Reword explanations
* Reword explanation in other docs
---
docs/anki-integration.md | 8 ++++++++
ext/settings.html | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/docs/anki-integration.md b/docs/anki-integration.md
index 151137d479..411e210984 100644
--- a/docs/anki-integration.md
+++ b/docs/anki-integration.md
@@ -36,6 +36,10 @@ Flashcard fields can be configured with the following steps:
| `{document-title}` | Title of the web page that the term appeared in. |
| `{expression}` | Term expressed as kanji (will be displayed in kana if kanji is not available). |
| `{frequencies}` | Frequency information for the term. |
+ | `{frequency-harmonic-rank}` | The harmonic mean of frequency data for the current term. Defaults to rank 9999999 when frequency data is not found, indicating extremely low rank-based term usage. |
+ | `{frequency-harmonic-occurrence}` | The harmonic mean of frequency data for the current term. Defaults to 0 occurrences when frequency data is not found, the lowest possible occurrence-based term usage. |
+ | `{frequency-average-rank}` | The average of frequency data for the current term. Defaults to rank 9999999 when frequency data is not found, indicating extremely low rank-based term usage. |
+ | `{frequency-average-occurrence}` | The average of frequency data for the current term. Defaults to 0 occurrences when frequency data is not found, the lowest possible occurrence-based term usage. |
| `{furigana}` | Term expressed as kanji with furigana displayed above it (e.g. 日本語). |
| `{furigana-plain}` | Term expressed as kanji with furigana displayed next to it in brackets (e.g. 日本語[にほんご]). |
| `{glossary}` | List of definitions for the term (output format depends on whether running in _grouped_ mode). |
@@ -67,6 +71,10 @@ Flashcard fields can be configured with the following steps:
| `{dictionary}` | Name of the dictionary from which the card is being created. |
| `{document-title}` | Title of the web page that the kanji appeared in. |
| `{frequencies}` | Frequency information for the kanji. |
+ | `{frequency-harmonic-rank}` | The harmonic mean of frequency data for the current kanji. Defaults to rank 9999999 when frequency data is not found, indicating extremely low rank-based kanji usage. |
+ | `{frequency-harmonic-occurrence}` | The harmonic mean of frequency data for the current kanji. Defaults to 0 occurrences when frequency data is not found, the lowest possible occurrence-based kanji usage. |
+ | `{frequency-average-rank}` | The average of frequency data for the current kanji. Defaults to rank 9999999 when frequency data is not found, indicating extremely low rank-based kanji usage. |
+ | `{frequency-average-occurrence}` | The average of frequency data for the current kanji. Defaults to 0 occurrences when frequency data is not found, the lowest possible occurrence-based kanji usage. |
| `{glossary}` | List of definitions for the kanji. |
| `{kunyomi}` | Kunyomi (Japanese reading) for the kanji expressed as katakana. |
| `{onyomi}` | Onyomi (Chinese reading) for the kanji expressed as hiragana. |
diff --git a/ext/settings.html b/ext/settings.html
index f59041db36..e156140940 100644
--- a/ext/settings.html
+++ b/ext/settings.html
@@ -3394,6 +3394,40 @@
Yomitan Settings
{document-title} |
Title of the web page that the term or kanji appeared in. |
+
+ {frequencies} |
+
+ Frequency information for the term or kanji.
+ |
+
+
+ {frequency-harmonic-rank} |
+
+ The harmonic mean of frequency data for the current term or kanji.
+ Defaults to rank 9999999 when frequency data is not found, indicating extremely low rank-based term or kanji usage.
+ |
+
+
+ {frequency-harmonic-occurrence} |
+
+ The harmonic mean of frequency data for the current term or kanji.
+ Defaults to 0 occurrences when frequency data is not found, the lowest possible occurrence-based term or kanji usage.
+ |
+
+
+ {frequency-average-rank} |
+
+ The average of frequency data for the current term or kanji.
+ Defaults to rank 9999999 when frequency data is not found, indicating extremely low rank-based term or kanji usage.
+ |
+
+
+ {frequency-average-occurrence} |
+
+ The average of frequency data for the current term or kanji.
+ Defaults to 0 occurrences when frequency data is not found, the lowest possible occurrence-based term or kanji usage.
+ |
+
{screenshot} |
Screenshot of the web page taken at the time the term or kanji was added. |
From 63a381743de94d2487a929cd3ef3f15e8166be0e Mon Sep 17 00:00:00 2001
From: Cashew <52880648+Scrub1492@users.noreply.github.com>
Date: Sun, 4 Feb 2024 14:04:17 +0700
Subject: [PATCH 2/6] Deinflect Json overhaul (#433)
* deinflect overhaul template
* remove duplicates with -e rule
* deinflection updates
* add neba deinflections
* kansaiben updates
* remove redundancy
* Revert "remove redundancy"
This reverts commit de714066851680314c988b577e77e6bd4c9db26a.
* update deinflect.json
* move deinflect.json to japanese-transforms.json
* remove trailing spaces
* wip add tests
* update deinflect.json, add tests
* run 'npm run test-code-write'
* rename to kansai-ben
* update tests
* run 'npm run test-code-write' again
* add -tara deinflection
---
ext/data/language/japanese-transforms.json | 227 +++++++++++++++++-
test/data/anki-note-builder-test-results.json | 2 +-
.../translator-test-results-note-data1.json | 7 +
test/data/translator-test-results.json | 7 +
test/language-transformer.test.js | 122 +++++++++-
5 files changed, 360 insertions(+), 5 deletions(-)
diff --git a/ext/data/language/japanese-transforms.json b/ext/data/language/japanese-transforms.json
index 007b140422..a46678793a 100644
--- a/ext/data/language/japanese-transforms.json
+++ b/ext/data/language/japanese-transforms.json
@@ -410,6 +410,69 @@
{"suffixIn": "來ぬ", "suffixOut": "來る", "conditionsIn": [], "conditionsOut": ["vk"]}
]
},
+ {
+ "name": "-mu",
+ "rules": [
+ {"suffixIn": "む", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v1"]},
+ {"suffixIn": "かむ", "suffixOut": "く", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "がむ", "suffixOut": "ぐ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "さむ", "suffixOut": "す", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "たむ", "suffixOut": "つ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "なむ", "suffixOut": "ぬ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "ばむ", "suffixOut": "ぶ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "まむ", "suffixOut": "む", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "らむ", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "わむ", "suffixOut": "う", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "ぜむ", "suffixOut": "ずる", "conditionsIn": [], "conditionsOut": ["vz"]},
+ {"suffixIn": "せむ", "suffixOut": "する", "conditionsIn": [], "conditionsOut": ["vs"]},
+ {"suffixIn": "為む", "suffixOut": "為る", "conditionsIn": [], "conditionsOut": ["vs"]},
+ {"suffixIn": "こむ", "suffixOut": "くる", "conditionsIn": [], "conditionsOut": ["vk"]},
+ {"suffixIn": "来む", "suffixOut": "来る", "conditionsIn": [], "conditionsOut": ["vk"]},
+ {"suffixIn": "來む", "suffixOut": "來る", "conditionsIn": [], "conditionsOut": ["vk"]}
+ ]
+ },
+ {
+ "name": "-zaru",
+ "rules": [
+ {"suffixIn": "ざる", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v1"]},
+ {"suffixIn": "かざる", "suffixOut": "く", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "がざる", "suffixOut": "ぐ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "さざる", "suffixOut": "す", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "たざる", "suffixOut": "つ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "なざる", "suffixOut": "ぬ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "ばざる", "suffixOut": "ぶ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "まざる", "suffixOut": "む", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "らざる", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "わざる", "suffixOut": "う", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "ぜざる", "suffixOut": "ずる", "conditionsIn": [], "conditionsOut": ["vz"]},
+ {"suffixIn": "せざる", "suffixOut": "する", "conditionsIn": [], "conditionsOut": ["vs"]},
+ {"suffixIn": "為ざる", "suffixOut": "為る", "conditionsIn": [], "conditionsOut": ["vs"]},
+ {"suffixIn": "こざる", "suffixOut": "くる", "conditionsIn": [], "conditionsOut": ["vk"]},
+ {"suffixIn": "来ざる", "suffixOut": "来る", "conditionsIn": [], "conditionsOut": ["vk"]},
+ {"suffixIn": "來ざる", "suffixOut": "來る", "conditionsIn": [], "conditionsOut": ["vk"]}
+ ]
+ },
+ {
+ "name": "-neba",
+ "rules": [
+ {"suffixIn": "ねば", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v1"]},
+ {"suffixIn": "かねば", "suffixOut": "く", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "がねば", "suffixOut": "ぐ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "さねば", "suffixOut": "す", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "たねば", "suffixOut": "つ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "なねば", "suffixOut": "ぬ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "ばねば", "suffixOut": "ぶ", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "まねば", "suffixOut": "む", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "らねば", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "わねば", "suffixOut": "う", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "ぜねば", "suffixOut": "ずる", "conditionsIn": [], "conditionsOut": ["vz"]},
+ {"suffixIn": "せねば", "suffixOut": "する", "conditionsIn": [], "conditionsOut": ["vs"]},
+ {"suffixIn": "為ねば", "suffixOut": "為る", "conditionsIn": [], "conditionsOut": ["vs"]},
+ {"suffixIn": "こねば", "suffixOut": "くる", "conditionsIn": [], "conditionsOut": ["vk"]},
+ {"suffixIn": "来ねば", "suffixOut": "来る", "conditionsIn": [], "conditionsOut": ["vk"]},
+ {"suffixIn": "來ねば", "suffixOut": "來る", "conditionsIn": [], "conditionsOut": ["vk"]}
+ ]
+ },
{
"name": "adv",
"rules": [
@@ -844,8 +907,168 @@
{"suffixIn": "ちぇえ", "suffixOut": "ちゃい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
{"suffixIn": "でえ", "suffixOut": "どい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
{"suffixIn": "れえ", "suffixOut": "れい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
- {"suffixIn": "べえ", "suffixOut": "ばい", "conditionsIn": [], "conditionsOut": ["adj-i"]}
+ {"suffixIn": "べえ", "suffixOut": "ばい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "てえ", "suffixOut": "たい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "ねぇ", "suffixOut": "ない", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "めぇ", "suffixOut": "むい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "みぃ", "suffixOut": "むい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "ちぃ", "suffixOut": "つい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "せぇ", "suffixOut": "すい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "けぇ", "suffixOut": "かい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "げぇ", "suffixOut": "がい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "げぇ", "suffixOut": "ごい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "せぇ", "suffixOut": "さい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "めぇ", "suffixOut": "まい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "ぜぇ", "suffixOut": "ずい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "っぜぇ", "suffixOut": "ずい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "れぇ", "suffixOut": "らい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "でぇ", "suffixOut": "どい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "れぇ", "suffixOut": "れい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "べぇ", "suffixOut": "ばい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "てぇ", "suffixOut": "たい", "conditionsIn": [], "conditionsOut": ["adj-i"]}
+ ]
+ },
+ {
+ "name": "slang",
+ "rules": [
+ {"suffixIn": "てぇてぇ", "suffixOut": "とうとい", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "てぇてぇ", "suffixOut": "尊い", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "おなしゃす", "suffixOut": "おねがいします", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "おなしゃす", "suffixOut": "お願いします", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "あざす", "suffixOut": "ありがとうございます", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "さーせん", "suffixOut": "すみません", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "神ってる", "suffixOut": "神がかっている", "conditionsIn": [], "conditionsOut": ["v1p"]},
+ {"suffixIn": "じわる", "suffixOut": "じわじわ来る", "conditionsIn": [], "conditionsOut": ["vk"]},
+ {"suffixIn": "おさしみ", "suffixOut": "おやすみ", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "おやさい", "suffixOut": "おやすみ", "conditionsIn": [], "conditionsOut": []}
+ ]
+ },
+ {
+ "name": "kansai-ben",
+ "description": "Negative form of kansai-ben verbs",
+ "rules": [
+ {"suffixIn": "へん", "suffixOut": "ない", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "ひん", "suffixOut": "ない", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "せえへん", "suffixOut": "しない", "conditionsIn": [], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "へんかった", "suffixOut": "なかった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ひんかった", "suffixOut": "なかった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "うてへん", "suffixOut": "ってない", "conditionsIn": [], "conditionsOut": ["adj-i"]}
+ ]
+ },
+ {
+ "name": "kansai-ben",
+ "description": "-ku stem of kansai-ben adjectives",
+ "rules": [
+ {"suffixIn": "う", "suffixOut": "く", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "こう", "suffixOut": "かく", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ごう", "suffixOut": "がく", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "そう", "suffixOut": "さく", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "とう", "suffixOut": "たく", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "のう", "suffixOut": "なく", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ぼう", "suffixOut": "ばく", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "もう", "suffixOut": "まく", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ろう", "suffixOut": "らく", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "よう", "suffixOut": "よく", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "しゅう", "suffixOut": "しく", "conditionsIn": [], "conditionsOut": []}
+ ]
+ },
+ {
+ "name": "kansai-ben",
+ "description": "-te form of kansai-ben adjectives",
+ "rules": [
+ {"suffixIn": "うて", "suffixOut": "くて", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "こうて", "suffixOut": "かくて", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ごうて", "suffixOut": "がくて", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "そうて", "suffixOut": "さくて", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "とうて", "suffixOut": "たくて", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "のうて", "suffixOut": "なくて", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ぼうて", "suffixOut": "ばくて", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "もうて", "suffixOut": "まくて", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ろうて", "suffixOut": "らくて", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ようて", "suffixOut": "よくて", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "しゅうて", "suffixOut": "しくて", "conditionsIn": [], "conditionsOut": []}
+ ]
+ },
+ {
+ "name": "kansai-ben",
+ "description": "Negative form of kansai-ben adjectives",
+ "rules": [
+ {"suffixIn": "うない", "suffixOut": "くない", "conditionsIn": ["adj-i"], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "こうない", "suffixOut": "かくない", "conditionsIn": ["adj-i"], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "ごうない", "suffixOut": "がくない", "conditionsIn": ["adj-i"], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "そうない", "suffixOut": "さくない", "conditionsIn": ["adj-i"], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "とうない", "suffixOut": "たくない", "conditionsIn": ["adj-i"], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "のうない", "suffixOut": "なくない", "conditionsIn": ["adj-i"], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "ぼうない", "suffixOut": "ばくない", "conditionsIn": ["adj-i"], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "もうない", "suffixOut": "まくない", "conditionsIn": ["adj-i"], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "ろうない", "suffixOut": "らくない", "conditionsIn": ["adj-i"], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "ようない", "suffixOut": "よくない", "conditionsIn": ["adj-i"], "conditionsOut": ["adj-i"]},
+ {"suffixIn": "しゅうない", "suffixOut": "しくない", "conditionsIn": ["adj-i"], "conditionsOut": ["adj-i"]}
+ ]
+ },
+ {
+ "name": "kansai-ben",
+ "description": "-te form of kansai-ben verbs",
+ "rules": [
+ {"suffixIn": "うて", "suffixOut": "って", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "おうて", "suffixOut": "あって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "こうて", "suffixOut": "かって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ごうて", "suffixOut": "がって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "そうて", "suffixOut": "さって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ぞうて", "suffixOut": "ざって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "とうて", "suffixOut": "たって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "どうて", "suffixOut": "だって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "のうて", "suffixOut": "なって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ほうて", "suffixOut": "はって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ぼうて", "suffixOut": "ばって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "もうて", "suffixOut": "まって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ろうて", "suffixOut": "らって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ようて", "suffixOut": "やって", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ゆうて", "suffixOut": "いって", "conditionsIn": [], "conditionsOut": []}
+ ]
+ },
+ {
+ "name": "kansai-ben",
+ "description": "past form of kansai-ben terms",
+ "rules": [
+ {"suffixIn": "うた", "suffixOut": "った", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "おうた", "suffixOut": "あった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "こうた", "suffixOut": "かった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ごうた", "suffixOut": "がった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "そうた", "suffixOut": "さった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ぞうた", "suffixOut": "ざった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "とうた", "suffixOut": "たった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "どうた", "suffixOut": "だった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "のうた", "suffixOut": "なった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ほうた", "suffixOut": "はった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ぼうた", "suffixOut": "ばった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "もうた", "suffixOut": "まった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ろうた", "suffixOut": "らった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ようた", "suffixOut": "やった", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ゆうた", "suffixOut": "いった", "conditionsIn": [], "conditionsOut": []}
+ ]
+ },
+ {
+ "name": "kansai-ben",
+ "description": "-tara form of kansai-ben terms",
+ "rules": [
+ {"suffixIn": "うたら", "suffixOut": "ったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "おうたら", "suffixOut": "あったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "こうたら", "suffixOut": "かったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ごうたら", "suffixOut": "がったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "そうたら", "suffixOut": "さったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ぞうたら", "suffixOut": "ざったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "とうたら", "suffixOut": "たったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "どうたら", "suffixOut": "だったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "のうたら", "suffixOut": "なったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ほうたら", "suffixOut": "はったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ぼうたら", "suffixOut": "ばったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "もうたら", "suffixOut": "まったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ろうたら", "suffixOut": "らったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ようたら", "suffixOut": "やったら", "conditionsIn": [], "conditionsOut": []},
+ {"suffixIn": "ゆうたら", "suffixOut": "いったら", "conditionsIn": [], "conditionsOut": []}
]
}
]
-}
\ No newline at end of file
+}
+
diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json
index 07b3182dc0..526beec717 100644
--- a/test/data/anki-note-builder-test-results.json
+++ b/test/data/anki-note-builder-test-results.json
@@ -3232,7 +3232,7 @@
"cloze-body": "のたもうた",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
- "conjugation": "past",
+ "conjugation": "",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "のたまう",
diff --git a/test/data/translator-test-results-note-data1.json b/test/data/translator-test-results-note-data1.json
index 610bb4517e..510b1bb51d 100644
--- a/test/data/translator-test-results-note-data1.json
+++ b/test/data/translator-test-results-note-data1.json
@@ -29913,6 +29913,13 @@
"inflectionRules": [
"past"
]
+ },
+ {
+ "source": "algorithm",
+ "inflectionRules": [
+ "past",
+ "kansai-ben"
+ ]
}
],
"score": 1,
diff --git a/test/data/translator-test-results.json b/test/data/translator-test-results.json
index 8cf257ff91..2b43e4bc84 100644
--- a/test/data/translator-test-results.json
+++ b/test/data/translator-test-results.json
@@ -16893,6 +16893,13 @@
"inflectionRules": [
"past"
]
+ },
+ {
+ "source": "algorithm",
+ "inflectionRules": [
+ "past",
+ "kansai-ben"
+ ]
}
],
"score": 1,
diff --git a/test/language-transformer.test.js b/test/language-transformer.test.js
index b99c1befcd..a0a69b64bf 100644
--- a/test/language-transformer.test.js
+++ b/test/language-transformer.test.js
@@ -122,6 +122,8 @@ function testDeinflections() {
{term: '食べる', source: '食べたり', rule: 'v1', reasons: ['-tari']},
{term: '食べる', source: '食べず', rule: 'v1', reasons: ['-zu']},
{term: '食べる', source: '食べぬ', rule: 'v1', reasons: ['-nu']},
+ {term: '食べる', source: '食べざる', rule: 'v1', reasons: ['-zaru']},
+ {term: '食べる', source: '食べねば', rule: 'v1', reasons: ['-neba']},
{term: '食べる', source: '食べ', rule: 'v1d', reasons: ['masu stem']},
{term: '食べる', source: '食べましょう', rule: 'v1', reasons: ['polite volitional']},
{term: '食べる', source: '食べよう', rule: 'v1', reasons: ['volitional']},
@@ -170,6 +172,8 @@ function testDeinflections() {
{term: '買う', source: '買ったり', rule: 'v5', reasons: ['-tari']},
{term: '買う', source: '買わず', rule: 'v5', reasons: ['-zu']},
{term: '買う', source: '買わぬ', rule: 'v5', reasons: ['-nu']},
+ {term: '買う', source: '買わざる', rule: 'v5', reasons: ['-zaru']},
+ {term: '買う', source: '買わねば', rule: 'v5', reasons: ['-neba']},
{term: '買う', source: '買い', rule: 'v5', reasons: ['masu stem']},
{term: '買う', source: '買いましょう', rule: 'v5', reasons: ['polite volitional']},
{term: '買う', source: '買おう', rule: 'v5', reasons: ['volitional']},
@@ -218,6 +222,8 @@ function testDeinflections() {
{term: '行く', source: '行いたり', rule: 'v5', reasons: ['-tari']},
{term: '行く', source: '行かず', rule: 'v5', reasons: ['-zu']},
{term: '行く', source: '行かぬ', rule: 'v5', reasons: ['-nu']},
+ {term: '行く', source: '行かざる', rule: 'v5', reasons: ['-zaru']},
+ {term: '行く', source: '行かねば', rule: 'v5', reasons: ['-neba']},
{term: '行く', source: '行き', rule: 'v5', reasons: ['masu stem']},
{term: '行く', source: '行きましょう', rule: 'v5', reasons: ['polite volitional']},
{term: '行く', source: '行こう', rule: 'v5', reasons: ['volitional']},
@@ -266,6 +272,8 @@ function testDeinflections() {
{term: '泳ぐ', source: '泳いだり', rule: 'v5', reasons: ['-tari']},
{term: '泳ぐ', source: '泳がず', rule: 'v5', reasons: ['-zu']},
{term: '泳ぐ', source: '泳がぬ', rule: 'v5', reasons: ['-nu']},
+ {term: '泳ぐ', source: '泳がざる', rule: 'v5', reasons: ['-zaru']},
+ {term: '泳ぐ', source: '泳がねば', rule: 'v5', reasons: ['-neba']},
{term: '泳ぐ', source: '泳ぎ', rule: 'v5', reasons: ['masu stem']},
{term: '泳ぐ', source: '泳ぎましょう', rule: 'v5', reasons: ['polite volitional']},
{term: '泳ぐ', source: '泳ごう', rule: 'v5', reasons: ['volitional']},
@@ -313,6 +321,8 @@ function testDeinflections() {
{term: '話す', source: '話したり', rule: 'v5', reasons: ['-tari']},
{term: '話す', source: '話さず', rule: 'v5', reasons: ['-zu']},
{term: '話す', source: '話さぬ', rule: 'v5', reasons: ['-nu']},
+ {term: '話す', source: '話さざる', rule: 'v5', reasons: ['-zaru']},
+ {term: '話す', source: '話さねば', rule: 'v5', reasons: ['-neba']},
{term: '話す', source: '話し', rule: 'v5', reasons: ['masu stem']},
{term: '話す', source: '話しましょう', rule: 'v5', reasons: ['polite volitional']},
{term: '話す', source: '話そう', rule: 'v5', reasons: ['volitional']},
@@ -361,6 +371,8 @@ function testDeinflections() {
{term: '待つ', source: '待ったり', rule: 'v5', reasons: ['-tari']},
{term: '待つ', source: '待たず', rule: 'v5', reasons: ['-zu']},
{term: '待つ', source: '待たぬ', rule: 'v5', reasons: ['-nu']},
+ {term: '待つ', source: '待たざる', rule: 'v5', reasons: ['-zaru']},
+ {term: '待つ', source: '待たねば', rule: 'v5', reasons: ['-neba']},
{term: '待つ', source: '待ち', rule: 'v5', reasons: ['masu stem']},
{term: '待つ', source: '待ちましょう', rule: 'v5', reasons: ['polite volitional']},
{term: '待つ', source: '待とう', rule: 'v5', reasons: ['volitional']},
@@ -409,6 +421,8 @@ function testDeinflections() {
{term: '死ぬ', source: '死んだり', rule: 'v5', reasons: ['-tari']},
{term: '死ぬ', source: '死なず', rule: 'v5', reasons: ['-zu']},
{term: '死ぬ', source: '死なぬ', rule: 'v5', reasons: ['-nu']},
+ {term: '死ぬ', source: '死なざる', rule: 'v5', reasons: ['-zaru']},
+ {term: '死ぬ', source: '死なねば', rule: 'v5', reasons: ['-neba']},
{term: '死ぬ', source: '死に', rule: 'v5', reasons: ['masu stem']},
{term: '死ぬ', source: '死にましょう', rule: 'v5', reasons: ['polite volitional']},
{term: '死ぬ', source: '死のう', rule: 'v5', reasons: ['volitional']},
@@ -456,6 +470,8 @@ function testDeinflections() {
{term: '遊ぶ', source: '遊んだり', rule: 'v5', reasons: ['-tari']},
{term: '遊ぶ', source: '遊ばず', rule: 'v5', reasons: ['-zu']},
{term: '遊ぶ', source: '遊ばぬ', rule: 'v5', reasons: ['-nu']},
+ {term: '遊ぶ', source: '遊ばざる', rule: 'v5', reasons: ['-zaru']},
+ {term: '遊ぶ', source: '遊ばねば', rule: 'v5', reasons: ['-neba']},
{term: '遊ぶ', source: '遊び', rule: 'v5', reasons: ['masu stem']},
{term: '遊ぶ', source: '遊びましょう', rule: 'v5', reasons: ['polite volitional']},
{term: '遊ぶ', source: '遊ぼう', rule: 'v5', reasons: ['volitional']},
@@ -503,6 +519,8 @@ function testDeinflections() {
{term: '飲む', source: '飲んだり', rule: 'v5', reasons: ['-tari']},
{term: '飲む', source: '飲まず', rule: 'v5', reasons: ['-zu']},
{term: '飲む', source: '飲まぬ', rule: 'v5', reasons: ['-nu']},
+ {term: '飲む', source: '飲まざる', rule: 'v5', reasons: ['-zaru']},
+ {term: '飲む', source: '飲まねば', rule: 'v5', reasons: ['-neba']},
{term: '飲む', source: '飲み', rule: 'v5', reasons: ['masu stem']},
{term: '飲む', source: '飲みましょう', rule: 'v5', reasons: ['polite volitional']},
{term: '飲む', source: '飲もう', rule: 'v5', reasons: ['volitional']},
@@ -550,6 +568,8 @@ function testDeinflections() {
{term: '作る', source: '作ったり', rule: 'v5', reasons: ['-tari']},
{term: '作る', source: '作らず', rule: 'v5', reasons: ['-zu']},
{term: '作る', source: '作らぬ', rule: 'v5', reasons: ['-nu']},
+ {term: '作る', source: '作らざる', rule: 'v5', reasons: ['-zaru']},
+ {term: '作る', source: '作らねば', rule: 'v5', reasons: ['-neba']},
{term: '作る', source: '作り', rule: 'v5', reasons: ['masu stem']},
{term: '作る', source: '作りましょう', rule: 'v5', reasons: ['polite volitional']},
{term: '作る', source: '作ろう', rule: 'v5', reasons: ['volitional']},
@@ -602,6 +622,8 @@ function testDeinflections() {
{term: '為る', source: '為たり', rule: 'vs', reasons: ['-tari']},
{term: '為る', source: '為ず', rule: 'vs', reasons: ['-zu']},
{term: '為る', source: '為ぬ', rule: 'vs', reasons: ['-nu']},
+ {term: '為る', source: '為ざる', rule: 'vs', reasons: ['-zaru']},
+ {term: '為る', source: '為ねば', rule: 'vs', reasons: ['-neba']},
// ['masu stem']
{term: '為る', source: '為ましょう', rule: 'vs', reasons: ['polite volitional']},
{term: '為る', source: '為よう', rule: 'vs', reasons: ['volitional']},
@@ -651,6 +673,8 @@ function testDeinflections() {
{term: 'する', source: 'したり', rule: 'vs', reasons: ['-tari']},
{term: 'する', source: 'せず', rule: 'vs', reasons: ['-zu']},
{term: 'する', source: 'せぬ', rule: 'vs', reasons: ['-nu']},
+ {term: 'する', source: 'せざる', rule: 'vs', reasons: ['-zaru']},
+ {term: 'する', source: 'せねば', rule: 'vs', reasons: ['-neba']},
// ['masu stem']
{term: 'する', source: 'しましょう', rule: 'vs', reasons: ['polite volitional']},
{term: 'する', source: 'しよう', rule: 'vs', reasons: ['volitional']},
@@ -694,6 +718,8 @@ function testDeinflections() {
{term: '来る', source: '来たり', rule: 'vk', reasons: ['-tari']},
{term: '来る', source: '来ず', rule: 'vk', reasons: ['-zu']},
{term: '来る', source: '来ぬ', rule: 'vk', reasons: ['-nu']},
+ {term: '来る', source: '来ざる', rule: 'vk', reasons: ['-zaru']},
+ {term: '来る', source: '来ねば', rule: 'vk', reasons: ['-neba']},
{term: '来る', source: '来', rule: 'vk', reasons: ['masu stem']},
{term: '来る', source: '来ましょう', rule: 'vk', reasons: ['polite volitional']},
{term: '来る', source: '来よう', rule: 'vk', reasons: ['volitional']},
@@ -737,6 +763,8 @@ function testDeinflections() {
{term: '來る', source: '來たり', rule: 'vk', reasons: ['-tari']},
{term: '來る', source: '來ず', rule: 'vk', reasons: ['-zu']},
{term: '來る', source: '來ぬ', rule: 'vk', reasons: ['-nu']},
+ {term: '來る', source: '來ざる', rule: 'vk', reasons: ['-zaru']},
+ {term: '來る', source: '來ねば', rule: 'vk', reasons: ['-neba']},
{term: '來る', source: '來', rule: 'vk', reasons: ['masu stem']},
{term: '來る', source: '來ましょう', rule: 'vk', reasons: ['polite volitional']},
{term: '來る', source: '來よう', rule: 'vk', reasons: ['volitional']},
@@ -780,6 +808,8 @@ function testDeinflections() {
{term: 'くる', source: 'きたり', rule: 'vk', reasons: ['-tari']},
{term: 'くる', source: 'こず', rule: 'vk', reasons: ['-zu']},
{term: 'くる', source: 'こぬ', rule: 'vk', reasons: ['-nu']},
+ {term: 'くる', source: 'こざる', rule: 'vk', reasons: ['-zaru']},
+ {term: 'くる', source: 'こねば', rule: 'vk', reasons: ['-neba']},
{term: 'くる', source: 'き', rule: 'vk', reasons: ['masu stem']},
{term: 'くる', source: 'きましょう', rule: 'vk', reasons: ['polite volitional']},
{term: 'くる', source: 'こよう', rule: 'vk', reasons: ['volitional']},
@@ -835,6 +865,8 @@ function testDeinflections() {
{term: '論ずる', source: '論じたり', rule: 'vz', reasons: ['-tari']},
{term: '論ずる', source: '論ぜず', rule: 'vz', reasons: ['-zu']},
{term: '論ずる', source: '論ぜぬ', rule: 'vz', reasons: ['-nu']},
+ {term: '論ずる', source: '論ぜざる', rule: 'vz', reasons: ['-zaru']},
+ {term: '論ずる', source: '論ぜねば', rule: 'vz', reasons: ['-neba']},
// ['masu stem']
{term: '論ずる', source: '論じましょう', rule: 'vz', reasons: ['polite volitional']},
{term: '論ずる', source: '論じよう', rule: 'vz', reasons: ['volitional']},
@@ -876,7 +908,27 @@ function testDeinflections() {
{term: 'ちっちゃい', source: 'ちっちぇえ', rule: 'adj-i', reasons: ['-e']},
{term: 'あかい', source: 'あけえ', rule: 'adj-i', reasons: ['-e']},
{term: 'こわい', source: 'こええ', rule: 'adj-i', reasons: ['-e']},
- {term: 'つよい', source: 'つええ', rule: 'adj-i', reasons: ['-e']}
+ {term: 'つよい', source: 'つええ', rule: 'adj-i', reasons: ['-e']},
+ // small -e
+ {term: 'すごい', source: 'すげぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'やばい', source: 'やべぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'うるさい', source: 'うるせぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'ひどい', source: 'ひでぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'ない', source: 'ねぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'できる', source: 'できねぇ', rule: 'v1', reasons: ['negative', '-e']},
+ {term: 'しんじる', source: 'しんじねぇ', rule: 'v1', reasons: ['negative', '-e']},
+ {term: 'さむい', source: 'さめぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'さむい', source: 'さみぃ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'あつい', source: 'あちぃ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'やすい', source: 'やせぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'たかい', source: 'たけぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'みじかい', source: 'みじけぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'ながい', source: 'なげぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'くさい', source: 'くせぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'うまい', source: 'うめぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'でかい', source: 'でけぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'まずい', source: 'まっぜぇ', rule: 'adj-i', reasons: ['-e']},
+ {term: 'あかい', source: 'あけぇ', rule: 'adj-i', reasons: ['-e']}
]
},
{
@@ -1010,6 +1062,72 @@ function testDeinflections() {
tests: [
{term: '食べる', source: '食べて', rule: null, reasons: ['-te', 'progressive or perfect', 'masu stem']}
]
+ },
+ // Kansai-ben
+ {
+ category: '-ku stem of kansai-ben adjectives',
+ valid: true,
+ tests: [
+ {term: '宜しい', source: '宜しゅう', rule: null, reasons: ['adv', 'kansai-ben']},
+ {term: 'よろしい', source: 'よろしゅう', rule: null, reasons: ['adv', 'kansai-ben']},
+ {term: '良い', source: '良う', rule: null, reasons: ['adv', 'kansai-ben']},
+ {term: 'よい', source: 'よう', rule: null, reasons: ['adv', 'kansai-ben']}
+ ]
+ },
+ {
+ category: '-te form of kansai-ben adjectives',
+ valid: true,
+ tests: [
+ {term: 'よろしい', source: 'よろしゅうて', rule: null, reasons: ['-te', 'kansai-ben']},
+ {term: '宜しい', source: '宜しゅうて', rule: null, reasons: ['-te', 'kansai-ben']},
+ {term: 'よい', source: 'ようて', rule: null, reasons: ['-te', 'kansai-ben']},
+ {term: '良い', source: '良うて', rule: null, reasons: ['-te', 'kansai-ben']}
+ ]
+ },
+ {
+ category: 'Negative form of kansai-ben adjectives',
+ valid: true,
+ tests: [
+ {term: 'よろしい', source: 'よろしゅうない', rule: null, reasons: ['negative', 'kansai-ben']},
+ {term: '宜しい', source: '宜しゅうない', rule: null, reasons: ['negative', 'kansai-ben']},
+ {term: 'よい', source: 'ようない', rule: null, reasons: ['negative', 'kansai-ben']},
+ {term: '良い', source: '良うない', rule: null, reasons: ['negative', 'kansai-ben']}
+ ]
+ },
+ {
+ category: 'Negative form of kansai-ben verbs',
+ valid: true,
+ tests: [
+ {term: '食べる', source: '食べへん', rule: null, reasons: ['negative', 'kansai-ben']},
+ {term: '食べる', source: '食べへんかった', rule: null, reasons: ['negative', 'past', 'kansai-ben']}
+ ]
+ },
+ {
+ category: '-te form of kansai-ben verbs',
+ valid: true,
+ tests: [
+ {term: '買う', source: '買うて', rule: null, reasons: ['-te', 'kansai-ben']},
+ {term: 'かう', source: 'こうて', rule: null, reasons: ['-te', 'kansai-ben']},
+ {term: 'はう', source: 'ほうて', rule: null, reasons: ['-te', 'kansai-ben']}
+ ]
+ },
+ {
+ category: 'past form of kansai-ben terms',
+ valid: true,
+ tests: [
+ {term: '買う', source: '買うた', rule: null, reasons: ['past', 'kansai-ben']},
+ {term: 'かう', source: 'こうた', rule: null, reasons: ['past', 'kansai-ben']},
+ {term: 'はう', source: 'ほうた', rule: null, reasons: ['past', 'kansai-ben']}
+ ]
+ },
+ {
+ category: '-tara form of kansai-ben terms',
+ valid: true,
+ tests: [
+ {term: '買う', source: '買うたら', rule: null, reasons: ['-tara', 'kansai-ben']},
+ {term: 'かう', source: 'こうたら', rule: null, reasons: ['-tara', 'kansai-ben']},
+ {term: 'はう', source: 'ほうたら', rule: null, reasons: ['-tara', 'kansai-ben']}
+ ]
}
];
/* eslint-enable no-multi-spaces */
@@ -1025,7 +1143,7 @@ function testDeinflections() {
for (const {source, term, rule, reasons} of tests) {
const {has} = hasTermReasons(languageTransformer, source, term, rule, reasons);
let message = `${source} ${valid ? 'has' : 'does not have'} term candidate ${JSON.stringify(term)}`;
- if (typeof rule !== 'undefined') {
+ if (rule !== null) {
message += ` with rule ${JSON.stringify(rule)}`;
}
if (reasons !== null) {
From 7d38d64c478c8c62c8cff12f3c1ee72729a7b80d Mon Sep 17 00:00:00 2001
From: StefanVukovic99
Date: Sun, 4 Feb 2024 08:08:06 +0100
Subject: [PATCH 3/6] Extract fetch functions to utilities (#629)
* do backend
* other files
* move fetch utils to own file
* remove extra line
* add extra line
* remove unnecessary export
* undo changes to cssStyleApplier
---
ext/js/background/backend.js | 48 +++-------------------------
ext/js/core/fetch-utilities.js | 57 ++++++++++++++++++++++++++++++++++
ext/js/data/options-util.js | 46 +++------------------------
3 files changed, 66 insertions(+), 85 deletions(-)
create mode 100644 ext/js/core/fetch-utilities.js
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index b95626f5ac..af0b303967 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -23,7 +23,7 @@ import {ClipboardReader} from '../comm/clipboard-reader.js';
import {Mecab} from '../comm/mecab.js';
import {createApiMap, invokeApiMapHandler} from '../core/api-map.js';
import {ExtensionError} from '../core/extension-error.js';
-import {readResponseJson} from '../core/json.js';
+import {fetchJson, fetchText} from '../core/fetch-utilities.js';
import {log} from '../core/logger.js';
import {clone, deferPromise, isObject, promiseTimeout} from '../core/utilities.js';
import {isNoteDataValid} from '../data/anki-util.js';
@@ -279,11 +279,11 @@ export class Backend {
}
/** @type {import('language-transformer').LanguageTransformDescriptor} */
- const descriptor = await this._fetchJson('/data/language/japanese-transforms.json');
+ const descriptor = await fetchJson('/data/language/japanese-transforms.json');
this._translator.prepare(descriptor);
await this._optionsUtil.prepare();
- this._defaultAnkiFieldTemplates = (await this._fetchText('/data/templates/default-anki-field-templates.handlebars')).trim();
+ this._defaultAnkiFieldTemplates = (await fetchText('/data/templates/default-anki-field-templates.handlebars')).trim();
this._options = await this._optionsUtil.load();
this._applyOptions('background');
@@ -668,7 +668,7 @@ export class Backend {
if (!url.startsWith('/') || url.startsWith('//') || !url.endsWith('.css')) {
throw new Error('Invalid URL');
}
- return await this._fetchText(url);
+ return await fetchText(url);
}
/** @type {import('api').ApiHandler<'getEnvironmentInfo'>} */
@@ -683,7 +683,7 @@ export class Backend {
/** @type {import('api').ApiHandler<'getDisplayTemplatesHtml'>} */
async _onApiGetDisplayTemplatesHtml() {
- return await this._fetchText('/display-templates.html');
+ return await fetchText('/display-templates.html');
}
/** @type {import('api').ApiHandler<'getZoom'>} */
@@ -1848,44 +1848,6 @@ export class Backend {
});
}
- /**
- * @param {string} url
- * @returns {Promise}
- */
- async _fetchAsset(url) {
- const response = await fetch(chrome.runtime.getURL(url), {
- method: 'GET',
- mode: 'no-cors',
- cache: 'default',
- credentials: 'omit',
- redirect: 'follow',
- referrerPolicy: 'no-referrer'
- });
- if (!response.ok) {
- throw new Error(`Failed to fetch ${url}: ${response.status}`);
- }
- return response;
- }
-
- /**
- * @param {string} url
- * @returns {Promise}
- */
- async _fetchText(url) {
- const response = await this._fetchAsset(url);
- return await response.text();
- }
-
- /**
- * @template [T=unknown]
- * @param {string} url
- * @returns {Promise}
- */
- async _fetchJson(url) {
- const response = await this._fetchAsset(url);
- return await readResponseJson(response);
- }
-
/**
* @template {import('application').ApiNames} TName
* @param {import('application').ApiMessage} message
diff --git a/ext/js/core/fetch-utilities.js b/ext/js/core/fetch-utilities.js
new file mode 100644
index 0000000000..074f7c9a22
--- /dev/null
+++ b/ext/js/core/fetch-utilities.js
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2024 Yomitan Authors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+import {readResponseJson} from './json.js';
+
+/**
+ * @param {string} url
+ * @returns {Promise}
+ */
+async function fetchAsset(url) {
+ const response = await fetch(chrome.runtime.getURL(url), {
+ method: 'GET',
+ mode: 'no-cors',
+ cache: 'default',
+ credentials: 'omit',
+ redirect: 'follow',
+ referrerPolicy: 'no-referrer'
+ });
+ if (!response.ok) {
+ throw new Error(`Failed to fetch ${url}: ${response.status}`);
+ }
+ return response;
+}
+
+
+/**
+ * @param {string} url
+ * @returns {Promise}
+ */
+export async function fetchText(url) {
+ const response = await fetchAsset(url);
+ return await response.text();
+}
+
+/**
+ * @template [T=unknown]
+ * @param {string} url
+ * @returns {Promise}
+ */
+export async function fetchJson(url) {
+ const response = await fetchAsset(url);
+ return await readResponseJson(response);
+}
\ No newline at end of file
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index cbaeb92b77..3f3a5ab846 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -16,8 +16,9 @@
* along with this program. If not, see .
*/
+import {fetchJson, fetchText} from '../core/fetch-utilities.js';
+import {parseJson} from '../core/json.js';
import {escapeRegExp, isObject} from '../core/utilities.js';
-import {parseJson, readResponseJson} from '../core/json.js';
import {TemplatePatcher} from '../templates/template-patcher.js';
import {JsonSchema} from './json-schema.js';
@@ -32,7 +33,7 @@ export class OptionsUtil {
/** */
async prepare() {
/** @type {import('ext/json-schema').Schema} */
- const schema = await this._fetchJson('/data/schemas/options-schema.json');
+ const schema = await fetchJson('/data/schemas/options-schema.json');
this._optionsSchema = new JsonSchema(schema);
}
@@ -438,7 +439,7 @@ export class OptionsUtil {
if (fieldTemplates === null) { continue; }
if (patch === null) {
- const content = await this._fetchText(modificationsUrl);
+ const content = await fetchText(modificationsUrl);
if (this._templatePatcher === null) {
this._templatePatcher = new TemplatePatcher();
}
@@ -449,45 +450,6 @@ export class OptionsUtil {
}
}
- /**
- * @param {string} url
- * @returns {Promise}
- */
- async _fetchGeneric(url) {
- url = chrome.runtime.getURL(url);
- const response = await fetch(url, {
- method: 'GET',
- mode: 'no-cors',
- cache: 'default',
- credentials: 'omit',
- redirect: 'follow',
- referrerPolicy: 'no-referrer'
- });
- if (!response.ok) {
- throw new Error(`Failed to fetch ${url}: ${response.status}`);
- }
- return response;
- }
-
- /**
- * @param {string} url
- * @returns {Promise}
- */
- async _fetchText(url) {
- const response = await this._fetchGeneric(url);
- return await response.text();
- }
-
- /**
- * @template [T=unknown]
- * @param {string} url
- * @returns {Promise}
- */
- async _fetchJson(url) {
- const response = await this._fetchGeneric(url);
- return await readResponseJson(response);
- }
-
/**
* @param {string} string
* @returns {number}
From e4c6608103be5b031a0ba3ce1c70982114480360 Mon Sep 17 00:00:00 2001
From: StefanVukovic99
Date: Sun, 4 Feb 2024 08:08:44 +0100
Subject: [PATCH 4/6] move files (#630)
---
.eslintrc.json | 4 ++--
ext/js/background/backend.js | 2 +-
ext/js/comm/clipboard-monitor.js | 2 +-
ext/js/data/anki-note-builder.js | 2 +-
ext/js/data/sandbox/anki-note-data-creator.js | 2 +-
ext/js/display/display-generator.js | 2 +-
ext/js/display/query-parser.js | 8 ++++----
ext/js/display/sandbox/pronunciation-generator.js | 2 +-
ext/js/display/sandbox/structured-content-generator.js | 2 +-
ext/js/language/{ => ja}/japanese-wanakana.js | 6 +++---
ext/js/language/{ => ja}/japanese.js | 4 ++--
ext/js/language/translator.js | 4 ++--
ext/js/media/audio-downloader.js | 2 +-
ext/js/templates/sandbox/anki-template-renderer.js | 2 +-
test/japanese-util.test.js | 4 ++--
15 files changed, 24 insertions(+), 24 deletions(-)
rename ext/js/language/{ => ja}/japanese-wanakana.js (94%)
rename ext/js/language/{ => ja}/japanese.js (99%)
diff --git a/.eslintrc.json b/.eslintrc.json
index 156b35b556..3557f83a3e 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -615,8 +615,8 @@
"ext/js/core.js",
"ext/js/core/extension-error.js",
"ext/js/**/sandbox/**/*.js",
- "ext/js/language/japanese.js",
- "ext/js/language/japanese-wanakana.js"
+ "ext/js/language/ja/japanese.js",
+ "ext/js/language/ja/japanese-wanakana.js"
],
"env": {
"webextensions": false
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index af0b303967..85acac895d 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -33,7 +33,7 @@ import {arrayBufferToBase64} from '../data/sandbox/array-buffer-util.js';
import {DictionaryDatabase} from '../dictionary/dictionary-database.js';
import {Environment} from '../extension/environment.js';
import {ObjectPropertyAccessor} from '../general/object-property-accessor.js';
-import {distributeFuriganaInflected, isCodePointJapanese, isStringPartiallyJapanese, convertKatakanaToHiragana as jpConvertKatakanaToHiragana} from '../language/japanese.js';
+import {distributeFuriganaInflected, isCodePointJapanese, isStringPartiallyJapanese, convertKatakanaToHiragana as jpConvertKatakanaToHiragana} from '../language/ja/japanese.js';
import {Translator} from '../language/translator.js';
import {AudioDownloader} from '../media/audio-downloader.js';
import {getFileExtensionFromAudioMediaType, getFileExtensionFromImageMediaType} from '../media/media-util.js';
diff --git a/ext/js/comm/clipboard-monitor.js b/ext/js/comm/clipboard-monitor.js
index a8e79a1b13..6ee93f5709 100644
--- a/ext/js/comm/clipboard-monitor.js
+++ b/ext/js/comm/clipboard-monitor.js
@@ -17,7 +17,7 @@
*/
import {EventDispatcher} from '../core/event-dispatcher.js';
-import {isStringPartiallyJapanese} from '../language/japanese.js';
+import {isStringPartiallyJapanese} from '../language/ja/japanese.js';
/**
* @augments EventDispatcher
diff --git a/ext/js/data/anki-note-builder.js b/ext/js/data/anki-note-builder.js
index a6e1aafcf2..52160abcb1 100644
--- a/ext/js/data/anki-note-builder.js
+++ b/ext/js/data/anki-note-builder.js
@@ -18,7 +18,7 @@
import {ExtensionError} from '../core/extension-error.js';
import {deferPromise} from '../core/utilities.js';
-import {convertHiraganaToKatakana, convertKatakanaToHiragana} from '../language/japanese.js';
+import {convertHiraganaToKatakana, convertKatakanaToHiragana} from '../language/ja/japanese.js';
import {cloneFieldMarkerPattern, getRootDeckName} from './anki-util.js';
export class AnkiNoteBuilder {
diff --git a/ext/js/data/sandbox/anki-note-data-creator.js b/ext/js/data/sandbox/anki-note-data-creator.js
index 79570532c2..f43595b627 100644
--- a/ext/js/data/sandbox/anki-note-data-creator.js
+++ b/ext/js/data/sandbox/anki-note-data-creator.js
@@ -17,7 +17,7 @@
*/
import {getDisambiguations, getGroupedPronunciations, getPronunciationsOfType, getTermFrequency, groupTermTags} from '../../dictionary/dictionary-data-util.js';
-import {distributeFurigana} from '../../language/japanese.js';
+import {distributeFurigana} from '../../language/ja/japanese.js';
/**
* Creates a compatibility representation of the specified data.
diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js
index fdfe3d4a77..621ea83360 100644
--- a/ext/js/display/display-generator.js
+++ b/ext/js/display/display-generator.js
@@ -20,7 +20,7 @@ import {ExtensionError} from '../core/extension-error.js';
import {isObject} from '../core/utilities.js';
import {getDisambiguations, getGroupedPronunciations, getTermFrequency, groupKanjiFrequencies, groupTermFrequencies, groupTermTags, isNonNounVerbOrAdjective} from '../dictionary/dictionary-data-util.js';
import {HtmlTemplateCollection} from '../dom/html-template-collection.js';
-import {distributeFurigana, getKanaMorae, getPitchCategory, isCodePointKanji, isStringPartiallyJapanese} from '../language/japanese.js';
+import {distributeFurigana, getKanaMorae, getPitchCategory, isCodePointKanji, isStringPartiallyJapanese} from '../language/ja/japanese.js';
import {createPronunciationDownstepPosition, createPronunciationGraph, createPronunciationText} from './sandbox/pronunciation-generator.js';
import {StructuredContentGenerator} from './sandbox/structured-content-generator.js';
diff --git a/ext/js/display/query-parser.js b/ext/js/display/query-parser.js
index 6ec803a0b3..c864617b25 100644
--- a/ext/js/display/query-parser.js
+++ b/ext/js/display/query-parser.js
@@ -19,7 +19,7 @@
import {EventDispatcher} from '../core/event-dispatcher.js';
import {log} from '../core/logger.js';
import {querySelectorNotNull} from '../dom/query-selector.js';
-import {convertHiraganaToKatakana, convertKatakanaToHiragana, isStringEntirelyKana} from '../language/japanese.js';
+import {convertHiraganaToKatakana, convertKatakanaToHiragana, isStringEntirelyKana} from '../language/ja/japanese.js';
import {TextScanner} from '../language/text-scanner.js';
/**
@@ -67,9 +67,9 @@ export class QueryParser extends EventDispatcher {
searchOnClick: true,
textSourceGenerator
});
- /** @type {?(import('../language/japanese-wanakana.js'))} */
+ /** @type {?(import('../language/ja/japanese-wanakana.js'))} */
this._japaneseWanakanaModule = null;
- /** @type {?Promise} */
+ /** @type {?Promise} */
this._japaneseWanakanaModuleImport = null;
}
@@ -409,7 +409,7 @@ export class QueryParser extends EventDispatcher {
/** */
_loadJapaneseWanakanaModule() {
if (this._japaneseWanakanaModuleImport !== null) { return; }
- this._japaneseWanakanaModuleImport = import('../language/japanese-wanakana.js');
+ this._japaneseWanakanaModuleImport = import('../language/ja/japanese-wanakana.js');
this._japaneseWanakanaModuleImport.then((value) => { this._japaneseWanakanaModule = value; });
}
}
diff --git a/ext/js/display/sandbox/pronunciation-generator.js b/ext/js/display/sandbox/pronunciation-generator.js
index 373ec8305c..f28520be56 100644
--- a/ext/js/display/sandbox/pronunciation-generator.js
+++ b/ext/js/display/sandbox/pronunciation-generator.js
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-import {getKanaDiacriticInfo, isMoraPitchHigh} from '../../language/japanese.js';
+import {getKanaDiacriticInfo, isMoraPitchHigh} from '../../language/ja/japanese.js';
/**
* @param {string[]} morae
diff --git a/ext/js/display/sandbox/structured-content-generator.js b/ext/js/display/sandbox/structured-content-generator.js
index ff05cc026f..a04feaf2a0 100644
--- a/ext/js/display/sandbox/structured-content-generator.js
+++ b/ext/js/display/sandbox/structured-content-generator.js
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-import {isStringPartiallyJapanese} from '../../language/japanese.js';
+import {isStringPartiallyJapanese} from '../../language/ja/japanese.js';
export class StructuredContentGenerator {
/**
diff --git a/ext/js/language/japanese-wanakana.js b/ext/js/language/ja/japanese-wanakana.js
similarity index 94%
rename from ext/js/language/japanese-wanakana.js
rename to ext/js/language/ja/japanese-wanakana.js
index b48ab6d6a0..3226048977 100644
--- a/ext/js/language/japanese-wanakana.js
+++ b/ext/js/language/ja/japanese-wanakana.js
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-import * as wanakana from '../../lib/wanakana.js';
+import * as wanakana from '../../../lib/wanakana.js';
/**
* @param {string} text
- * @param {?import('../general/text-source-map.js').TextSourceMap} sourceMap
+ * @param {?import('../../general/text-source-map.js').TextSourceMap} sourceMap
* @param {number} sourceMapStart
* @returns {string}
*/
@@ -84,7 +84,7 @@ export function convertToRomaji(text) {
/**
* @param {string} text
- * @param {?import('../general/text-source-map.js').TextSourceMap} sourceMap
+ * @param {?import('../../general/text-source-map.js').TextSourceMap} sourceMap
* @returns {string}
*/
export function convertAlphabeticToKana(text, sourceMap = null) {
diff --git a/ext/js/language/japanese.js b/ext/js/language/ja/japanese.js
similarity index 99%
rename from ext/js/language/japanese.js
rename to ext/js/language/ja/japanese.js
index 88eb5af589..a450804032 100644
--- a/ext/js/language/japanese.js
+++ b/ext/js/language/ja/japanese.js
@@ -539,7 +539,7 @@ export function convertNumericToFullWidth(text) {
/**
* @param {string} text
- * @param {?import('../general/text-source-map.js').TextSourceMap} [sourceMap]
+ * @param {?import('../../general/text-source-map.js').TextSourceMap} [sourceMap]
* @returns {string}
*/
export function convertHalfWidthKanaToFullWidth(text, sourceMap = null) {
@@ -705,7 +705,7 @@ export function distributeFuriganaInflected(term, reading, source) {
/**
* @param {string} text
* @param {boolean} fullCollapse
- * @param {?import('../general/text-source-map.js').TextSourceMap} [sourceMap]
+ * @param {?import('../../general/text-source-map.js').TextSourceMap} [sourceMap]
* @returns {string}
*/
export function collapseEmphaticSequences(text, fullCollapse, sourceMap = null) {
diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js
index 334eb5b786..007a7d1e42 100644
--- a/ext/js/language/translator.js
+++ b/ext/js/language/translator.js
@@ -18,8 +18,8 @@
import {applyTextReplacement} from '../general/regex-util.js';
import {TextSourceMap} from '../general/text-source-map.js';
-import {convertAlphabeticToKana} from './japanese-wanakana.js';
-import {collapseEmphaticSequences, convertHalfWidthKanaToFullWidth, convertHiraganaToKatakana, convertKatakanaToHiragana, convertNumericToFullWidth, isCodePointJapanese} from './japanese.js';
+import {convertAlphabeticToKana} from './ja/japanese-wanakana.js';
+import {collapseEmphaticSequences, convertHalfWidthKanaToFullWidth, convertHiraganaToKatakana, convertKatakanaToHiragana, convertNumericToFullWidth, isCodePointJapanese} from './ja/japanese.js';
import {LanguageTransformer} from './language-transformer.js';
/**
diff --git a/ext/js/media/audio-downloader.js b/ext/js/media/audio-downloader.js
index 968c935333..b594db7f52 100644
--- a/ext/js/media/audio-downloader.js
+++ b/ext/js/media/audio-downloader.js
@@ -23,7 +23,7 @@ import {JsonSchema} from '../data/json-schema.js';
import {arrayBufferToBase64} from '../data/sandbox/array-buffer-util.js';
import {NativeSimpleDOMParser} from '../dom/native-simple-dom-parser.js';
import {SimpleDOMParser} from '../dom/simple-dom-parser.js';
-import {isStringEntirelyKana} from '../language/japanese.js';
+import {isStringEntirelyKana} from '../language/ja/japanese.js';
export class AudioDownloader {
/**
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js
index 26d3f33653..8ece8e245c 100644
--- a/ext/js/templates/sandbox/anki-template-renderer.js
+++ b/ext/js/templates/sandbox/anki-template-renderer.js
@@ -22,7 +22,7 @@ import {getPronunciationsOfType, isNonNounVerbOrAdjective} from '../../dictionar
import {createPronunciationDownstepPosition, createPronunciationGraph, createPronunciationText} from '../../display/sandbox/pronunciation-generator.js';
import {StructuredContentGenerator} from '../../display/sandbox/structured-content-generator.js';
import {CssStyleApplier} from '../../dom/sandbox/css-style-applier.js';
-import {convertHiraganaToKatakana, convertKatakanaToHiragana, distributeFurigana, getKanaMorae, getPitchCategory, isMoraPitchHigh} from '../../language/japanese.js';
+import {convertHiraganaToKatakana, convertKatakanaToHiragana, distributeFurigana, getKanaMorae, getPitchCategory, isMoraPitchHigh} from '../../language/ja/japanese.js';
import {AnkiTemplateRendererContentManager} from './anki-template-renderer-content-manager.js';
import {TemplateRendererMediaProvider} from './template-renderer-media-provider.js';
import {TemplateRenderer} from './template-renderer.js';
diff --git a/test/japanese-util.test.js b/test/japanese-util.test.js
index d7b05c3e32..8997df7344 100644
--- a/test/japanese-util.test.js
+++ b/test/japanese-util.test.js
@@ -18,8 +18,8 @@
import {describe, expect, test} from 'vitest';
import {TextSourceMap} from '../ext/js/general/text-source-map.js';
-import * as jpw from '../ext/js/language/japanese-wanakana.js';
-import * as jp from '../ext/js/language/japanese.js';
+import * as jpw from '../ext/js/language/ja/japanese-wanakana.js';
+import * as jp from '../ext/js/language/ja/japanese.js';
/** */
function testIsCodePointKanji() {
From 1a10af12fb16d5719818c3dc16f95af075210190 Mon Sep 17 00:00:00 2001
From: toasted-nutbread
Date: Sun, 4 Feb 2024 02:09:32 -0500
Subject: [PATCH 5/6] Fix EOL whitespace (#631)
* Remove eol whitespace
* Add setting
---
.vscode/settings.json | 1 +
.../templates/anki-field-templates-upgrade-v24.handlebars | 2 +-
ext/data/templates/default-anki-field-templates.handlebars | 2 +-
test/data/html/document-util.html | 6 +++---
4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 44bef96287..5aa6512cdc 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -25,6 +25,7 @@
"typescript"
],
"files.eol": "\n",
+ "files.trimTrailingWhitespace": true,
"html-validate.validate": [
"html"
]
diff --git a/ext/data/templates/anki-field-templates-upgrade-v24.handlebars b/ext/data/templates/anki-field-templates-upgrade-v24.handlebars
index 2288737cc2..cd85028af7 100644
--- a/ext/data/templates/anki-field-templates-upgrade-v24.handlebars
+++ b/ext/data/templates/anki-field-templates-upgrade-v24.handlebars
@@ -4,7 +4,7 @@
{{~#each definition.phoneticTranscriptions~}}
{{~#each phoneticTranscriptions~}}
- {{~set "any" false~}}
+ {{~set "any" false~}}
{{~#each tags~}}
{{~#if (get "any")}}, {{else}}({{/if~}}
{{name}}
diff --git a/ext/data/templates/default-anki-field-templates.handlebars b/ext/data/templates/default-anki-field-templates.handlebars
index 07efd07e1a..63613acf34 100644
--- a/ext/data/templates/default-anki-field-templates.handlebars
+++ b/ext/data/templates/default-anki-field-templates.handlebars
@@ -239,7 +239,7 @@
{{~#each definition.phoneticTranscriptions~}}
{{~#each phoneticTranscriptions~}}
- {{~set "any" false~}}
+ {{~set "any" false~}}
{{~#each tags~}}
{{~#if (get "any")}}, {{else}}({{/if~}}
{{name}}
diff --git a/test/data/html/document-util.html b/test/data/html/document-util.html
index 8e007392ec..7ece0a6d32 100644
--- a/test/data/html/document-util.html
+++ b/test/data/html/document-util.html
@@ -271,7 +271,7 @@ DocumentUtil Tests
" わゐ ゑを",
" "
]
- }'
+ }'
>
あいうえお
@@ -353,7 +353,7 @@ DocumentUtil Tests
" わゐ ゑを",
" t"
]
- }'
+ }'
>
あいうえお
@@ -394,7 +394,7 @@ DocumentUtil Tests
" わゐ ゑを",
" t"
]
- }'
+ }'
>
あいうえお
From 6b327e0b7a7e8c91f1a7d99520c8769863228074 Mon Sep 17 00:00:00 2001
From: StefanVukovic99
Date: Sun, 4 Feb 2024 08:14:22 +0100
Subject: [PATCH 6/6] allow inflection rule chains with "polite" (#627)
* fix deinflection bug
* add test
* fix polite te and past
* expand verb flag
* fix polite negative
* fix polite volitional
* fix polite past negative
* remove unneeded rules in
* new deinflector format
* make nicer
* lint
* remove extra line
---
ext/data/language/japanese-transforms.json | 145 +++++------------
test/data/anki-note-builder-test-results.json | 10 +-
.../translator-test-results-note-data1.json | 19 ++-
test/data/translator-test-results.json | 19 ++-
test/language-transformer.test.js | 150 ++++++++++--------
5 files changed, 154 insertions(+), 189 deletions(-)
diff --git a/ext/data/language/japanese-transforms.json b/ext/data/language/japanese-transforms.json
index a46678793a..af2d0b04ad 100644
--- a/ext/data/language/japanese-transforms.json
+++ b/ext/data/language/japanese-transforms.json
@@ -1,6 +1,17 @@
{
"language": "ja",
"conditions": {
+ "v": {
+ "name": "Verb",
+ "partsOfSpeech": ["v1", "v5", "vk", "vs", "vz"],
+ "i18n": [
+ {
+ "language": "ja",
+ "name": "動詞"
+ }
+ ],
+ "subConditions": ["v1", "v5", "vk", "vs", "vz"]
+ },
"v1": {
"name": "Ichidan verb",
"partsOfSpeech": ["v1"],
@@ -365,7 +376,8 @@
{"suffixIn": "添うて", "suffixOut": "添う", "conditionsIn": ["iru"], "conditionsOut": ["v5"]},
{"suffixIn": "副うて", "suffixOut": "副う", "conditionsIn": ["iru"], "conditionsOut": ["v5"]},
{"suffixIn": "厭うて", "suffixOut": "厭う", "conditionsIn": ["iru"], "conditionsOut": ["v5"]},
- {"suffixIn": "のたもうて", "suffixOut": "のたまう", "conditionsIn": ["iru"], "conditionsOut": ["v5"]}
+ {"suffixIn": "のたもうて", "suffixOut": "のたまう", "conditionsIn": ["iru"], "conditionsOut": ["v5"]},
+ {"suffixIn": "まして", "suffixOut": "ます", "conditionsIn": [], "conditionsOut": ["v"]}
]
},
{
@@ -531,7 +543,7 @@
{
"name": "imperative negative",
"rules": [
- {"suffixIn": "な", "suffixOut": "", "conditionsIn": [], "conditionsOut": ["v1", "v5", "vk", "vs", "vz"]}
+ {"suffixIn": "な", "suffixOut": "", "conditionsIn": [], "conditionsOut": ["v"]}
]
},
{
@@ -592,7 +604,8 @@
{"suffixIn": "為ない", "suffixOut": "為る", "conditionsIn": ["adj-i"], "conditionsOut": ["vs"]},
{"suffixIn": "こない", "suffixOut": "くる", "conditionsIn": ["adj-i"], "conditionsOut": ["vk"]},
{"suffixIn": "来ない", "suffixOut": "来る", "conditionsIn": ["adj-i"], "conditionsOut": ["vk"]},
- {"suffixIn": "來ない", "suffixOut": "來る", "conditionsIn": ["adj-i"], "conditionsOut": ["vk"]}
+ {"suffixIn": "來ない", "suffixOut": "來る", "conditionsIn": ["adj-i"], "conditionsOut": ["vk"]},
+ {"suffixIn": "ません", "suffixOut": "ます", "conditionsIn": ["v"], "conditionsOut": ["v"]}
]
},
{
@@ -659,114 +672,31 @@
{"suffixIn": "添うた", "suffixOut": "添う", "conditionsIn": [], "conditionsOut": ["v5"]},
{"suffixIn": "副うた", "suffixOut": "副う", "conditionsIn": [], "conditionsOut": ["v5"]},
{"suffixIn": "厭うた", "suffixOut": "厭う", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "のたもうた", "suffixOut": "のたまう", "conditionsIn": [], "conditionsOut": ["v5"]}
+ {"suffixIn": "のたもうた", "suffixOut": "のたまう", "conditionsIn": [], "conditionsOut": ["v5"]},
+ {"suffixIn": "ました", "suffixOut": "ます", "conditionsIn": [], "conditionsOut": ["v"]},
+ {"suffixIn": "ませんでした", "suffixOut": "ません", "conditionsIn": [], "conditionsOut": ["v"]}
]
},
{
"name": "polite",
"rules": [
- {"suffixIn": "ます", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v1"]},
- {"suffixIn": "います", "suffixOut": "う", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "きます", "suffixOut": "く", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "ぎます", "suffixOut": "ぐ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "します", "suffixOut": "す", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "ちます", "suffixOut": "つ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "にます", "suffixOut": "ぬ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "びます", "suffixOut": "ぶ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "みます", "suffixOut": "む", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "ります", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "じます", "suffixOut": "ずる", "conditionsIn": [], "conditionsOut": ["vz"]},
- {"suffixIn": "します", "suffixOut": "する", "conditionsIn": [], "conditionsOut": ["vs"]},
- {"suffixIn": "為ます", "suffixOut": "為る", "conditionsIn": [], "conditionsOut": ["vs"]},
- {"suffixIn": "きます", "suffixOut": "くる", "conditionsIn": [], "conditionsOut": ["vk"]},
- {"suffixIn": "来ます", "suffixOut": "来る", "conditionsIn": [], "conditionsOut": ["vk"]},
- {"suffixIn": "來ます", "suffixOut": "來る", "conditionsIn": [], "conditionsOut": ["vk"]}
- ]
- },
- {
- "name": "polite negative",
- "rules": [
- {"suffixIn": "くありません", "suffixOut": "い", "conditionsIn": [], "conditionsOut": ["adj-i"]},
- {"suffixIn": "ません", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v1"]},
- {"suffixIn": "いません", "suffixOut": "う", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "きません", "suffixOut": "く", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "ぎません", "suffixOut": "ぐ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "しません", "suffixOut": "す", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "ちません", "suffixOut": "つ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "にません", "suffixOut": "ぬ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "びません", "suffixOut": "ぶ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "みません", "suffixOut": "む", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "りません", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "じません", "suffixOut": "ずる", "conditionsIn": [], "conditionsOut": ["vz"]},
- {"suffixIn": "しません", "suffixOut": "する", "conditionsIn": [], "conditionsOut": ["vs"]},
- {"suffixIn": "為ません", "suffixOut": "為る", "conditionsIn": [], "conditionsOut": ["vs"]},
- {"suffixIn": "きません", "suffixOut": "くる", "conditionsIn": [], "conditionsOut": ["vk"]},
- {"suffixIn": "来ません", "suffixOut": "来る", "conditionsIn": [], "conditionsOut": ["vk"]},
- {"suffixIn": "來ません", "suffixOut": "來る", "conditionsIn": [], "conditionsOut": ["vk"]}
- ]
- },
- {
- "name": "polite past",
- "rules": [
- {"suffixIn": "ました", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v1"]},
- {"suffixIn": "いました", "suffixOut": "う", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "きました", "suffixOut": "く", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "ぎました", "suffixOut": "ぐ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "しました", "suffixOut": "す", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "ちました", "suffixOut": "つ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "にました", "suffixOut": "ぬ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "びました", "suffixOut": "ぶ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "みました", "suffixOut": "む", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "りました", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "じました", "suffixOut": "ずる", "conditionsIn": [], "conditionsOut": ["vz"]},
- {"suffixIn": "しました", "suffixOut": "する", "conditionsIn": [], "conditionsOut": ["vs"]},
- {"suffixIn": "為ました", "suffixOut": "為る", "conditionsIn": [], "conditionsOut": ["vs"]},
- {"suffixIn": "きました", "suffixOut": "くる", "conditionsIn": [], "conditionsOut": ["vk"]},
- {"suffixIn": "来ました", "suffixOut": "来る", "conditionsIn": [], "conditionsOut": ["vk"]},
- {"suffixIn": "來ました", "suffixOut": "來る", "conditionsIn": [], "conditionsOut": ["vk"]}
- ]
- },
- {
- "name": "polite past negative",
- "rules": [
- {"suffixIn": "くありませんでした", "suffixOut": "い", "conditionsIn": [], "conditionsOut": ["adj-i"]},
- {"suffixIn": "ませんでした", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v1"]},
- {"suffixIn": "いませんでした", "suffixOut": "う", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "きませんでした", "suffixOut": "く", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "ぎませんでした", "suffixOut": "ぐ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "しませんでした", "suffixOut": "す", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "ちませんでした", "suffixOut": "つ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "にませんでした", "suffixOut": "ぬ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "びませんでした", "suffixOut": "ぶ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "みませんでした", "suffixOut": "む", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "りませんでした", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "じませんでした", "suffixOut": "ずる", "conditionsIn": [], "conditionsOut": ["vz"]},
- {"suffixIn": "しませんでした", "suffixOut": "する", "conditionsIn": [], "conditionsOut": ["vs"]},
- {"suffixIn": "為ませんでした", "suffixOut": "為る", "conditionsIn": [], "conditionsOut": ["vs"]},
- {"suffixIn": "きませんでした", "suffixOut": "くる", "conditionsIn": [], "conditionsOut": ["vk"]},
- {"suffixIn": "来ませんでした", "suffixOut": "来る", "conditionsIn": [], "conditionsOut": ["vk"]},
- {"suffixIn": "來ませんでした", "suffixOut": "來る", "conditionsIn": [], "conditionsOut": ["vk"]}
- ]
- },
- {
- "name": "polite volitional",
- "rules": [
- {"suffixIn": "ましょう", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v1"]},
- {"suffixIn": "いましょう", "suffixOut": "う", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "きましょう", "suffixOut": "く", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "ぎましょう", "suffixOut": "ぐ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "しましょう", "suffixOut": "す", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "ちましょう", "suffixOut": "つ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "にましょう", "suffixOut": "ぬ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "びましょう", "suffixOut": "ぶ", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "みましょう", "suffixOut": "む", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "りましょう", "suffixOut": "る", "conditionsIn": [], "conditionsOut": ["v5"]},
- {"suffixIn": "じましょう", "suffixOut": "ずる", "conditionsIn": [], "conditionsOut": ["vz"]},
- {"suffixIn": "しましょう", "suffixOut": "する", "conditionsIn": [], "conditionsOut": ["vs"]},
- {"suffixIn": "為ましょう", "suffixOut": "為る", "conditionsIn": [], "conditionsOut": ["vs"]},
- {"suffixIn": "きましょう", "suffixOut": "くる", "conditionsIn": [], "conditionsOut": ["vk"]},
- {"suffixIn": "来ましょう", "suffixOut": "来る", "conditionsIn": [], "conditionsOut": ["vk"]},
- {"suffixIn": "來ましょう", "suffixOut": "來る", "conditionsIn": [], "conditionsOut": ["vk"]}
+ {"suffixIn": "ます", "suffixOut": "る", "conditionsIn": ["v1"], "conditionsOut": ["v1"]},
+ {"suffixIn": "います", "suffixOut": "う", "conditionsIn": ["v5"], "conditionsOut": ["v5"]},
+ {"suffixIn": "きます", "suffixOut": "く", "conditionsIn": ["v5"], "conditionsOut": ["v5"]},
+ {"suffixIn": "ぎます", "suffixOut": "ぐ", "conditionsIn": ["v5"], "conditionsOut": ["v5"]},
+ {"suffixIn": "します", "suffixOut": "す", "conditionsIn": ["v5"], "conditionsOut": ["v5"]},
+ {"suffixIn": "ちます", "suffixOut": "つ", "conditionsIn": ["v5"], "conditionsOut": ["v5"]},
+ {"suffixIn": "にます", "suffixOut": "ぬ", "conditionsIn": ["v5"], "conditionsOut": ["v5"]},
+ {"suffixIn": "びます", "suffixOut": "ぶ", "conditionsIn": ["v5"], "conditionsOut": ["v5"]},
+ {"suffixIn": "みます", "suffixOut": "む", "conditionsIn": ["v5"], "conditionsOut": ["v5"]},
+ {"suffixIn": "ります", "suffixOut": "る", "conditionsIn": ["v5"], "conditionsOut": ["v5"]},
+ {"suffixIn": "じます", "suffixOut": "ずる", "conditionsIn": ["vz"], "conditionsOut": ["vz"]},
+ {"suffixIn": "します", "suffixOut": "する", "conditionsIn": ["vs"], "conditionsOut": ["vs"]},
+ {"suffixIn": "為ます", "suffixOut": "為る", "conditionsIn": ["vs"], "conditionsOut": ["vs"]},
+ {"suffixIn": "きます", "suffixOut": "くる", "conditionsIn": ["vk"], "conditionsOut": ["vk"]},
+ {"suffixIn": "来ます", "suffixOut": "来る", "conditionsIn": ["vk"], "conditionsOut": ["vk"]},
+ {"suffixIn": "來ます", "suffixOut": "來る", "conditionsIn": ["vk"], "conditionsOut": ["vk"]},
+ {"suffixIn": "くあります", "suffixOut": "い", "conditionsIn": ["v"], "conditionsOut": ["adj-i"]}
]
},
{
@@ -819,7 +749,8 @@
{"suffixIn": "為よう", "suffixOut": "為る", "conditionsIn": [], "conditionsOut": ["vs"]},
{"suffixIn": "こよう", "suffixOut": "くる", "conditionsIn": [], "conditionsOut": ["vk"]},
{"suffixIn": "来よう", "suffixOut": "来る", "conditionsIn": [], "conditionsOut": ["vk"]},
- {"suffixIn": "來よう", "suffixOut": "來る", "conditionsIn": [], "conditionsOut": ["vk"]}
+ {"suffixIn": "來よう", "suffixOut": "來る", "conditionsIn": [], "conditionsOut": ["vk"]},
+ {"suffixIn": "ましょう", "suffixOut": "ます", "conditionsIn": [], "conditionsOut": ["v"]}
]
},
{
diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json
index 526beec717..364c4ee948 100644
--- a/test/data/anki-note-builder-test-results.json
+++ b/test/data/anki-note-builder-test-results.json
@@ -1692,7 +1692,7 @@
"cloze-body": "打ち込んでいませんでした",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
- "conjugation": "-te « progressive or perfect « polite past negative",
+ "conjugation": "-te « progressive or perfect « polite « negative « past",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "打ち込む",
@@ -1727,7 +1727,7 @@
"cloze-body": "打ち込んでいませんでした",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
- "conjugation": "-te « progressive or perfect « polite past negative",
+ "conjugation": "-te « progressive or perfect « polite « negative « past",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "打ち込む",
@@ -1762,7 +1762,7 @@
"cloze-body": "打ち込んでいませんでした",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
- "conjugation": "-te « progressive or perfect « polite past negative",
+ "conjugation": "-te « progressive or perfect « polite « negative « past",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "打ち込む",
@@ -1797,7 +1797,7 @@
"cloze-body": "打ち込んでいませんでした",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
- "conjugation": "-te « progressive or perfect « polite past negative",
+ "conjugation": "-te « progressive or perfect « polite « negative « past",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "打ち込む",
@@ -2837,7 +2837,7 @@
"cloze-body": "testました",
"cloze-prefix": "cloze-prefix",
"cloze-suffix": "cloze-suffix",
- "conjugation": "polite past",
+ "conjugation": "polite « past",
"dictionary": "Test Dictionary 2",
"document-title": "title",
"expression": "読む",
diff --git a/test/data/translator-test-results-note-data1.json b/test/data/translator-test-results-note-data1.json
index 510b1bb51d..5f1409020a 100644
--- a/test/data/translator-test-results-note-data1.json
+++ b/test/data/translator-test-results-note-data1.json
@@ -15851,7 +15851,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
- "polite past negative"
+ "polite",
+ "negative",
+ "past"
]
}
],
@@ -16276,7 +16278,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
- "polite past negative"
+ "polite",
+ "negative",
+ "past"
]
}
],
@@ -16701,7 +16705,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
- "polite past negative"
+ "polite",
+ "negative",
+ "past"
]
}
],
@@ -17126,7 +17132,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
- "polite past negative"
+ "polite",
+ "negative",
+ "past"
]
}
],
@@ -26937,7 +26945,8 @@
{
"source": "algorithm",
"inflectionRules": [
- "polite past"
+ "polite",
+ "past"
]
}
],
diff --git a/test/data/translator-test-results.json b/test/data/translator-test-results.json
index 2b43e4bc84..925d36cf3b 100644
--- a/test/data/translator-test-results.json
+++ b/test/data/translator-test-results.json
@@ -9424,7 +9424,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
- "polite past negative"
+ "polite",
+ "negative",
+ "past"
]
}
],
@@ -9622,7 +9624,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
- "polite past negative"
+ "polite",
+ "negative",
+ "past"
]
}
],
@@ -9820,7 +9824,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
- "polite past negative"
+ "polite",
+ "negative",
+ "past"
]
}
],
@@ -10018,7 +10024,9 @@
"inflectionRules": [
"-te",
"progressive or perfect",
- "polite past negative"
+ "polite",
+ "negative",
+ "past"
]
}
],
@@ -15113,7 +15121,8 @@
{
"source": "algorithm",
"inflectionRules": [
- "polite past"
+ "polite",
+ "past"
]
}
],
diff --git a/test/language-transformer.test.js b/test/language-transformer.test.js
index a0a69b64bf..9e9a9ee34b 100644
--- a/test/language-transformer.test.js
+++ b/test/language-transformer.test.js
@@ -80,8 +80,8 @@ function testDeinflections() {
{term: '愛しい', source: '愛しくない', rule: 'adj-i', reasons: ['negative']},
{term: '愛しい', source: '愛しさ', rule: 'adj-i', reasons: ['noun']},
{term: '愛しい', source: '愛しかった', rule: 'adj-i', reasons: ['past']},
- {term: '愛しい', source: '愛しくありません', rule: 'adj-i', reasons: ['polite negative']},
- {term: '愛しい', source: '愛しくありませんでした', rule: 'adj-i', reasons: ['polite past negative']},
+ {term: '愛しい', source: '愛しくありません', rule: 'adj-i', reasons: ['polite', 'negative']},
+ {term: '愛しい', source: '愛しくありませんでした', rule: 'adj-i', reasons: ['polite', 'negative', 'past']},
{term: '愛しい', source: '愛しき', rule: 'adj-i', reasons: ['-ki']},
{term: '愛しい', source: '愛しげ', rule: 'adj-i', reasons: ['-ge']}
]
@@ -93,7 +93,7 @@ function testDeinflections() {
{term: '食べる', source: '食べる', rule: 'v1', reasons: []},
{term: '食べる', source: '食べます', rule: 'v1', reasons: ['polite']},
{term: '食べる', source: '食べた', rule: 'v1', reasons: ['past']},
- {term: '食べる', source: '食べました', rule: 'v1', reasons: ['polite past']},
+ {term: '食べる', source: '食べました', rule: 'v1', reasons: ['polite', 'past']},
{term: '食べる', source: '食べて', rule: 'v1', reasons: ['-te']},
{term: '食べる', source: '食べられる', rule: 'v1', reasons: ['potential or passive']},
{term: '食べる', source: '食べられる', rule: 'v1', reasons: ['potential or passive']},
@@ -101,15 +101,16 @@ function testDeinflections() {
{term: '食べる', source: '食べさせられる', rule: 'v1', reasons: ['causative', 'potential or passive']},
{term: '食べる', source: '食べろ', rule: 'v1', reasons: ['imperative']},
{term: '食べる', source: '食べない', rule: 'v1', reasons: ['negative']},
- {term: '食べる', source: '食べません', rule: 'v1', reasons: ['polite negative']},
+ {term: '食べる', source: '食べません', rule: 'v1', reasons: ['polite', 'negative']},
{term: '食べる', source: '食べなかった', rule: 'v1', reasons: ['negative', 'past']},
- {term: '食べる', source: '食べませんでした', rule: 'v1', reasons: ['polite past negative']},
+ {term: '食べる', source: '食べませんでした', rule: 'v1', reasons: ['polite', 'negative', 'past']},
{term: '食べる', source: '食べなくて', rule: 'v1', reasons: ['negative', '-te']},
{term: '食べる', source: '食べられない', rule: 'v1', reasons: ['potential or passive', 'negative']},
{term: '食べる', source: '食べられない', rule: 'v1', reasons: ['potential or passive', 'negative']},
{term: '食べる', source: '食べさせない', rule: 'v1', reasons: ['causative', 'negative']},
{term: '食べる', source: '食べさせられない', rule: 'v1', reasons: ['causative', 'potential or passive', 'negative']},
{term: '食べる', source: '食べるな', rule: 'v1', reasons: ['imperative negative']},
+ {term: '食べる', source: '食べまして', rule: 'v1', reasons: ['polite', '-te']},
{term: '食べる', source: '食べれば', rule: 'v1', reasons: ['-ba']},
{term: '食べる', source: '食べちゃう', rule: 'v1', reasons: ['-chau']},
@@ -125,7 +126,7 @@ function testDeinflections() {
{term: '食べる', source: '食べざる', rule: 'v1', reasons: ['-zaru']},
{term: '食べる', source: '食べねば', rule: 'v1', reasons: ['-neba']},
{term: '食べる', source: '食べ', rule: 'v1d', reasons: ['masu stem']},
- {term: '食べる', source: '食べましょう', rule: 'v1', reasons: ['polite volitional']},
+ {term: '食べる', source: '食べましょう', rule: 'v1', reasons: ['polite', 'volitional']},
{term: '食べる', source: '食べよう', rule: 'v1', reasons: ['volitional']},
// ['causative passive']
{term: '食べる', source: '食べとく', rule: 'v1', reasons: ['-toku']},
@@ -143,7 +144,7 @@ function testDeinflections() {
{term: '買う', source: '買う', rule: 'v5', reasons: []},
{term: '買う', source: '買います', rule: 'v5', reasons: ['polite']},
{term: '買う', source: '買った', rule: 'v5', reasons: ['past']},
- {term: '買う', source: '買いました', rule: 'v5', reasons: ['polite past']},
+ {term: '買う', source: '買いました', rule: 'v5', reasons: ['polite', 'past']},
{term: '買う', source: '買って', rule: 'v5', reasons: ['-te']},
{term: '買う', source: '買える', rule: 'v5', reasons: ['potential']},
{term: '買う', source: '買われる', rule: 'v5', reasons: ['passive']},
@@ -151,15 +152,16 @@ function testDeinflections() {
{term: '買う', source: '買わせられる', rule: 'v5', reasons: ['causative', 'potential or passive']},
{term: '買う', source: '買え', rule: 'v5', reasons: ['imperative']},
{term: '買う', source: '買わない', rule: 'v5', reasons: ['negative']},
- {term: '買う', source: '買いません', rule: 'v5', reasons: ['polite negative']},
+ {term: '買う', source: '買いません', rule: 'v5', reasons: ['polite', 'negative']},
{term: '買う', source: '買わなかった', rule: 'v5', reasons: ['negative', 'past']},
- {term: '買う', source: '買いませんでした', rule: 'v5', reasons: ['polite past negative']},
+ {term: '買う', source: '買いませんでした', rule: 'v5', reasons: ['polite', 'negative', 'past']},
{term: '買う', source: '買わなくて', rule: 'v5', reasons: ['negative', '-te']},
{term: '買う', source: '買えない', rule: 'v5', reasons: ['potential', 'negative']},
{term: '買う', source: '買われない', rule: 'v5', reasons: ['passive', 'negative']},
{term: '買う', source: '買わせない', rule: 'v5', reasons: ['causative', 'negative']},
{term: '買う', source: '買わせられない', rule: 'v5', reasons: ['causative', 'potential or passive', 'negative']},
{term: '買う', source: '買うな', rule: 'v5', reasons: ['imperative negative']},
+ {term: '買う', source: '買いまして', rule: 'v5', reasons: ['polite', '-te']},
{term: '買う', source: '買えば', rule: 'v5', reasons: ['-ba']},
{term: '買う', source: '買っちゃう', rule: 'v5', reasons: ['-chau']},
@@ -175,7 +177,7 @@ function testDeinflections() {
{term: '買う', source: '買わざる', rule: 'v5', reasons: ['-zaru']},
{term: '買う', source: '買わねば', rule: 'v5', reasons: ['-neba']},
{term: '買う', source: '買い', rule: 'v5', reasons: ['masu stem']},
- {term: '買う', source: '買いましょう', rule: 'v5', reasons: ['polite volitional']},
+ {term: '買う', source: '買いましょう', rule: 'v5', reasons: ['polite', 'volitional']},
{term: '買う', source: '買おう', rule: 'v5', reasons: ['volitional']},
{term: '買う', source: '買わされる', rule: 'v5', reasons: ['causative passive']},
{term: '買う', source: '買っとく', rule: 'v5', reasons: ['-toku']},
@@ -193,7 +195,7 @@ function testDeinflections() {
{term: '行く', source: '行く', rule: 'v5', reasons: []},
{term: '行く', source: '行きます', rule: 'v5', reasons: ['polite']},
{term: '行く', source: '行った', rule: 'v5', reasons: ['past']},
- {term: '行く', source: '行きました', rule: 'v5', reasons: ['polite past']},
+ {term: '行く', source: '行きました', rule: 'v5', reasons: ['polite', 'past']},
{term: '行く', source: '行って', rule: 'v5', reasons: ['-te']},
{term: '行く', source: '行ける', rule: 'v5', reasons: ['potential']},
{term: '行く', source: '行かれる', rule: 'v5', reasons: ['passive']},
@@ -201,15 +203,16 @@ function testDeinflections() {
{term: '行く', source: '行かせられる', rule: 'v5', reasons: ['causative', 'potential or passive']},
{term: '行く', source: '行け', rule: 'v5', reasons: ['imperative']},
{term: '行く', source: '行かない', rule: 'v5', reasons: ['negative']},
- {term: '行く', source: '行きません', rule: 'v5', reasons: ['polite negative']},
+ {term: '行く', source: '行きません', rule: 'v5', reasons: ['polite', 'negative']},
{term: '行く', source: '行かなかった', rule: 'v5', reasons: ['negative', 'past']},
- {term: '行く', source: '行きませんでした', rule: 'v5', reasons: ['polite past negative']},
+ {term: '行く', source: '行きませんでした', rule: 'v5', reasons: ['polite', 'negative', 'past']},
{term: '行く', source: '行かなくて', rule: 'v5', reasons: ['negative', '-te']},
{term: '行く', source: '行けない', rule: 'v5', reasons: ['potential', 'negative']},
{term: '行く', source: '行かれない', rule: 'v5', reasons: ['passive', 'negative']},
{term: '行く', source: '行かせない', rule: 'v5', reasons: ['causative', 'negative']},
{term: '行く', source: '行かせられない', rule: 'v5', reasons: ['causative', 'potential or passive', 'negative']},
{term: '行く', source: '行くな', rule: 'v5', reasons: ['imperative negative']},
+ {term: '行く', source: '行きまして', rule: 'v5', reasons: ['polite', '-te']},
{term: '行く', source: '行けば', rule: 'v5', reasons: ['-ba']},
{term: '行く', source: '行っちゃう', rule: 'v5', reasons: ['-chau']},
@@ -225,7 +228,7 @@ function testDeinflections() {
{term: '行く', source: '行かざる', rule: 'v5', reasons: ['-zaru']},
{term: '行く', source: '行かねば', rule: 'v5', reasons: ['-neba']},
{term: '行く', source: '行き', rule: 'v5', reasons: ['masu stem']},
- {term: '行く', source: '行きましょう', rule: 'v5', reasons: ['polite volitional']},
+ {term: '行く', source: '行きましょう', rule: 'v5', reasons: ['polite', 'volitional']},
{term: '行く', source: '行こう', rule: 'v5', reasons: ['volitional']},
{term: '行く', source: '行かされる', rule: 'v5', reasons: ['causative passive']},
{term: '行く', source: '行いとく', rule: 'v5', reasons: ['-toku']},
@@ -243,7 +246,7 @@ function testDeinflections() {
{term: '泳ぐ', source: '泳ぐ', rule: 'v5', reasons: []},
{term: '泳ぐ', source: '泳ぎます', rule: 'v5', reasons: ['polite']},
{term: '泳ぐ', source: '泳いだ', rule: 'v5', reasons: ['past']},
- {term: '泳ぐ', source: '泳ぎました', rule: 'v5', reasons: ['polite past']},
+ {term: '泳ぐ', source: '泳ぎました', rule: 'v5', reasons: ['polite', 'past']},
{term: '泳ぐ', source: '泳いで', rule: 'v5', reasons: ['-te']},
{term: '泳ぐ', source: '泳げる', rule: 'v5', reasons: ['potential']},
{term: '泳ぐ', source: '泳がれる', rule: 'v5', reasons: ['passive']},
@@ -251,15 +254,16 @@ function testDeinflections() {
{term: '泳ぐ', source: '泳がせられる', rule: 'v5', reasons: ['causative', 'potential or passive']},
{term: '泳ぐ', source: '泳げ', rule: 'v5', reasons: ['imperative']},
{term: '泳ぐ', source: '泳がない', rule: 'v5', reasons: ['negative']},
- {term: '泳ぐ', source: '泳ぎません', rule: 'v5', reasons: ['polite negative']},
+ {term: '泳ぐ', source: '泳ぎません', rule: 'v5', reasons: ['polite', 'negative']},
{term: '泳ぐ', source: '泳がなかった', rule: 'v5', reasons: ['negative', 'past']},
- {term: '泳ぐ', source: '泳ぎませんでした', rule: 'v5', reasons: ['polite past negative']},
+ {term: '泳ぐ', source: '泳ぎませんでした', rule: 'v5', reasons: ['polite', 'negative', 'past']},
{term: '泳ぐ', source: '泳がなくて', rule: 'v5', reasons: ['negative', '-te']},
{term: '泳ぐ', source: '泳げない', rule: 'v5', reasons: ['potential', 'negative']},
{term: '泳ぐ', source: '泳がれない', rule: 'v5', reasons: ['passive', 'negative']},
{term: '泳ぐ', source: '泳がせない', rule: 'v5', reasons: ['causative', 'negative']},
{term: '泳ぐ', source: '泳がせられない', rule: 'v5', reasons: ['causative', 'potential or passive', 'negative']},
{term: '泳ぐ', source: '泳ぐな', rule: 'v5', reasons: ['imperative negative']},
+ {term: '泳ぐ', source: '泳ぎまして', rule: 'v5', reasons: ['polite', '-te']},
{term: '泳ぐ', source: '泳げば', rule: 'v5', reasons: ['-ba']},
{term: '泳ぐ', source: '泳いじゃう', rule: 'v5', reasons: ['-chau']},
@@ -275,7 +279,7 @@ function testDeinflections() {
{term: '泳ぐ', source: '泳がざる', rule: 'v5', reasons: ['-zaru']},
{term: '泳ぐ', source: '泳がねば', rule: 'v5', reasons: ['-neba']},
{term: '泳ぐ', source: '泳ぎ', rule: 'v5', reasons: ['masu stem']},
- {term: '泳ぐ', source: '泳ぎましょう', rule: 'v5', reasons: ['polite volitional']},
+ {term: '泳ぐ', source: '泳ぎましょう', rule: 'v5', reasons: ['polite', 'volitional']},
{term: '泳ぐ', source: '泳ごう', rule: 'v5', reasons: ['volitional']},
{term: '泳ぐ', source: '泳がされる', rule: 'v5', reasons: ['causative passive']},
{term: '泳ぐ', source: '泳いどく', rule: 'v5', reasons: ['-toku']},
@@ -292,7 +296,7 @@ function testDeinflections() {
{term: '話す', source: '話す', rule: 'v5', reasons: []},
{term: '話す', source: '話します', rule: 'v5', reasons: ['polite']},
{term: '話す', source: '話した', rule: 'v5', reasons: ['past']},
- {term: '話す', source: '話しました', rule: 'v5', reasons: ['polite past']},
+ {term: '話す', source: '話しました', rule: 'v5', reasons: ['polite', 'past']},
{term: '話す', source: '話して', rule: 'v5', reasons: ['-te']},
{term: '話す', source: '話せる', rule: 'v5', reasons: ['potential']},
{term: '話す', source: '話される', rule: 'v5', reasons: ['passive']},
@@ -300,15 +304,16 @@ function testDeinflections() {
{term: '話す', source: '話させられる', rule: 'v5', reasons: ['causative', 'potential or passive']},
{term: '話す', source: '話せ', rule: 'v5', reasons: ['imperative']},
{term: '話す', source: '話さない', rule: 'v5', reasons: ['negative']},
- {term: '話す', source: '話しません', rule: 'v5', reasons: ['polite negative']},
+ {term: '話す', source: '話しません', rule: 'v5', reasons: ['polite', 'negative']},
{term: '話す', source: '話さなかった', rule: 'v5', reasons: ['negative', 'past']},
- {term: '話す', source: '話しませんでした', rule: 'v5', reasons: ['polite past negative']},
+ {term: '話す', source: '話しませんでした', rule: 'v5', reasons: ['polite', 'negative', 'past']},
{term: '話す', source: '話さなくて', rule: 'v5', reasons: ['negative', '-te']},
{term: '話す', source: '話せない', rule: 'v5', reasons: ['potential', 'negative']},
{term: '話す', source: '話されない', rule: 'v5', reasons: ['passive', 'negative']},
{term: '話す', source: '話させない', rule: 'v5', reasons: ['causative', 'negative']},
{term: '話す', source: '話させられない', rule: 'v5', reasons: ['causative', 'potential or passive', 'negative']},
{term: '話す', source: '話すな', rule: 'v5', reasons: ['imperative negative']},
+ {term: '話す', source: '話しまして', rule: 'v5', reasons: ['polite', '-te']},
{term: '話す', source: '話せば', rule: 'v5', reasons: ['-ba']},
{term: '話す', source: '話しちゃう', rule: 'v5', reasons: ['-chau']},
@@ -324,7 +329,7 @@ function testDeinflections() {
{term: '話す', source: '話さざる', rule: 'v5', reasons: ['-zaru']},
{term: '話す', source: '話さねば', rule: 'v5', reasons: ['-neba']},
{term: '話す', source: '話し', rule: 'v5', reasons: ['masu stem']},
- {term: '話す', source: '話しましょう', rule: 'v5', reasons: ['polite volitional']},
+ {term: '話す', source: '話しましょう', rule: 'v5', reasons: ['polite', 'volitional']},
{term: '話す', source: '話そう', rule: 'v5', reasons: ['volitional']},
// ['causative passive']
{term: '話す', source: '話しとく', rule: 'v5', reasons: ['-toku']},
@@ -342,7 +347,7 @@ function testDeinflections() {
{term: '待つ', source: '待つ', rule: 'v5', reasons: []},
{term: '待つ', source: '待ちます', rule: 'v5', reasons: ['polite']},
{term: '待つ', source: '待った', rule: 'v5', reasons: ['past']},
- {term: '待つ', source: '待ちました', rule: 'v5', reasons: ['polite past']},
+ {term: '待つ', source: '待ちました', rule: 'v5', reasons: ['polite', 'past']},
{term: '待つ', source: '待って', rule: 'v5', reasons: ['-te']},
{term: '待つ', source: '待てる', rule: 'v5', reasons: ['potential']},
{term: '待つ', source: '待たれる', rule: 'v5', reasons: ['passive']},
@@ -350,15 +355,16 @@ function testDeinflections() {
{term: '待つ', source: '待たせられる', rule: 'v5', reasons: ['causative', 'potential or passive']},
{term: '待つ', source: '待て', rule: 'v5', reasons: ['imperative']},
{term: '待つ', source: '待たない', rule: 'v5', reasons: ['negative']},
- {term: '待つ', source: '待ちません', rule: 'v5', reasons: ['polite negative']},
+ {term: '待つ', source: '待ちません', rule: 'v5', reasons: ['polite', 'negative']},
{term: '待つ', source: '待たなかった', rule: 'v5', reasons: ['negative', 'past']},
- {term: '待つ', source: '待ちませんでした', rule: 'v5', reasons: ['polite past negative']},
+ {term: '待つ', source: '待ちませんでした', rule: 'v5', reasons: ['polite', 'negative', 'past']},
{term: '待つ', source: '待たなくて', rule: 'v5', reasons: ['negative', '-te']},
{term: '待つ', source: '待てない', rule: 'v5', reasons: ['potential', 'negative']},
{term: '待つ', source: '待たれない', rule: 'v5', reasons: ['passive', 'negative']},
{term: '待つ', source: '待たせない', rule: 'v5', reasons: ['causative', 'negative']},
{term: '待つ', source: '待たせられない', rule: 'v5', reasons: ['causative', 'potential or passive', 'negative']},
{term: '待つ', source: '待つな', rule: 'v5', reasons: ['imperative negative']},
+ {term: '待つ', source: '待ちまして', rule: 'v5', reasons: ['polite', '-te']},
{term: '待つ', source: '待てば', rule: 'v5', reasons: ['-ba']},
{term: '待つ', source: '待っちゃう', rule: 'v5', reasons: ['-chau']},
@@ -374,7 +380,7 @@ function testDeinflections() {
{term: '待つ', source: '待たざる', rule: 'v5', reasons: ['-zaru']},
{term: '待つ', source: '待たねば', rule: 'v5', reasons: ['-neba']},
{term: '待つ', source: '待ち', rule: 'v5', reasons: ['masu stem']},
- {term: '待つ', source: '待ちましょう', rule: 'v5', reasons: ['polite volitional']},
+ {term: '待つ', source: '待ちましょう', rule: 'v5', reasons: ['polite', 'volitional']},
{term: '待つ', source: '待とう', rule: 'v5', reasons: ['volitional']},
{term: '待つ', source: '待たされる', rule: 'v5', reasons: ['causative passive']},
{term: '待つ', source: '待っとく', rule: 'v5', reasons: ['-toku']},
@@ -392,7 +398,7 @@ function testDeinflections() {
{term: '死ぬ', source: '死ぬ', rule: 'v5', reasons: []},
{term: '死ぬ', source: '死にます', rule: 'v5', reasons: ['polite']},
{term: '死ぬ', source: '死んだ', rule: 'v5', reasons: ['past']},
- {term: '死ぬ', source: '死にました', rule: 'v5', reasons: ['polite past']},
+ {term: '死ぬ', source: '死にました', rule: 'v5', reasons: ['polite', 'past']},
{term: '死ぬ', source: '死んで', rule: 'v5', reasons: ['-te']},
{term: '死ぬ', source: '死ねる', rule: 'v5', reasons: ['potential']},
{term: '死ぬ', source: '死なれる', rule: 'v5', reasons: ['passive']},
@@ -400,15 +406,16 @@ function testDeinflections() {
{term: '死ぬ', source: '死なせられる', rule: 'v5', reasons: ['causative', 'potential or passive']},
{term: '死ぬ', source: '死ね', rule: 'v5', reasons: ['imperative']},
{term: '死ぬ', source: '死なない', rule: 'v5', reasons: ['negative']},
- {term: '死ぬ', source: '死にません', rule: 'v5', reasons: ['polite negative']},
+ {term: '死ぬ', source: '死にません', rule: 'v5', reasons: ['polite', 'negative']},
{term: '死ぬ', source: '死ななかった', rule: 'v5', reasons: ['negative', 'past']},
- {term: '死ぬ', source: '死にませんでした', rule: 'v5', reasons: ['polite past negative']},
+ {term: '死ぬ', source: '死にませんでした', rule: 'v5', reasons: ['polite', 'negative', 'past']},
{term: '死ぬ', source: '死ななくて', rule: 'v5', reasons: ['negative', '-te']},
{term: '死ぬ', source: '死ねない', rule: 'v5', reasons: ['potential', 'negative']},
{term: '死ぬ', source: '死なれない', rule: 'v5', reasons: ['passive', 'negative']},
{term: '死ぬ', source: '死なせない', rule: 'v5', reasons: ['causative', 'negative']},
{term: '死ぬ', source: '死なせられない', rule: 'v5', reasons: ['causative', 'potential or passive', 'negative']},
{term: '死ぬ', source: '死ぬな', rule: 'v5', reasons: ['imperative negative']},
+ {term: '死ぬ', source: '死にまして', rule: 'v5', reasons: ['polite', '-te']},
{term: '死ぬ', source: '死ねば', rule: 'v5', reasons: ['-ba']},
{term: '死ぬ', source: '死んじゃう', rule: 'v5', reasons: ['-chau']},
@@ -424,7 +431,7 @@ function testDeinflections() {
{term: '死ぬ', source: '死なざる', rule: 'v5', reasons: ['-zaru']},
{term: '死ぬ', source: '死なねば', rule: 'v5', reasons: ['-neba']},
{term: '死ぬ', source: '死に', rule: 'v5', reasons: ['masu stem']},
- {term: '死ぬ', source: '死にましょう', rule: 'v5', reasons: ['polite volitional']},
+ {term: '死ぬ', source: '死にましょう', rule: 'v5', reasons: ['polite', 'volitional']},
{term: '死ぬ', source: '死のう', rule: 'v5', reasons: ['volitional']},
{term: '死ぬ', source: '死なされる', rule: 'v5', reasons: ['causative passive']},
{term: '死ぬ', source: '死んどく', rule: 'v5', reasons: ['-toku']},
@@ -441,7 +448,7 @@ function testDeinflections() {
{term: '遊ぶ', source: '遊ぶ', rule: 'v5', reasons: []},
{term: '遊ぶ', source: '遊びます', rule: 'v5', reasons: ['polite']},
{term: '遊ぶ', source: '遊んだ', rule: 'v5', reasons: ['past']},
- {term: '遊ぶ', source: '遊びました', rule: 'v5', reasons: ['polite past']},
+ {term: '遊ぶ', source: '遊びました', rule: 'v5', reasons: ['polite', 'past']},
{term: '遊ぶ', source: '遊んで', rule: 'v5', reasons: ['-te']},
{term: '遊ぶ', source: '遊べる', rule: 'v5', reasons: ['potential']},
{term: '遊ぶ', source: '遊ばれる', rule: 'v5', reasons: ['passive']},
@@ -449,15 +456,16 @@ function testDeinflections() {
{term: '遊ぶ', source: '遊ばせられる', rule: 'v5', reasons: ['causative', 'potential or passive']},
{term: '遊ぶ', source: '遊べ', rule: 'v5', reasons: ['imperative']},
{term: '遊ぶ', source: '遊ばない', rule: 'v5', reasons: ['negative']},
- {term: '遊ぶ', source: '遊びません', rule: 'v5', reasons: ['polite negative']},
+ {term: '遊ぶ', source: '遊びません', rule: 'v5', reasons: ['polite', 'negative']},
{term: '遊ぶ', source: '遊ばなかった', rule: 'v5', reasons: ['negative', 'past']},
- {term: '遊ぶ', source: '遊びませんでした', rule: 'v5', reasons: ['polite past negative']},
+ {term: '遊ぶ', source: '遊びませんでした', rule: 'v5', reasons: ['polite', 'negative', 'past']},
{term: '遊ぶ', source: '遊ばなくて', rule: 'v5', reasons: ['negative', '-te']},
{term: '遊ぶ', source: '遊べない', rule: 'v5', reasons: ['potential', 'negative']},
{term: '遊ぶ', source: '遊ばれない', rule: 'v5', reasons: ['passive', 'negative']},
{term: '遊ぶ', source: '遊ばせない', rule: 'v5', reasons: ['causative', 'negative']},
{term: '遊ぶ', source: '遊ばせられない', rule: 'v5', reasons: ['causative', 'potential or passive', 'negative']},
{term: '遊ぶ', source: '遊ぶな', rule: 'v5', reasons: ['imperative negative']},
+ {term: '遊ぶ', source: '遊びまして', rule: 'v5', reasons: ['polite', '-te']},
{term: '遊ぶ', source: '遊べば', rule: 'v5', reasons: ['-ba']},
{term: '遊ぶ', source: '遊んじゃう', rule: 'v5', reasons: ['-chau']},
@@ -473,7 +481,7 @@ function testDeinflections() {
{term: '遊ぶ', source: '遊ばざる', rule: 'v5', reasons: ['-zaru']},
{term: '遊ぶ', source: '遊ばねば', rule: 'v5', reasons: ['-neba']},
{term: '遊ぶ', source: '遊び', rule: 'v5', reasons: ['masu stem']},
- {term: '遊ぶ', source: '遊びましょう', rule: 'v5', reasons: ['polite volitional']},
+ {term: '遊ぶ', source: '遊びましょう', rule: 'v5', reasons: ['polite', 'volitional']},
{term: '遊ぶ', source: '遊ぼう', rule: 'v5', reasons: ['volitional']},
{term: '遊ぶ', source: '遊ばされる', rule: 'v5', reasons: ['causative passive']},
{term: '遊ぶ', source: '遊んどく', rule: 'v5', reasons: ['-toku']},
@@ -490,7 +498,7 @@ function testDeinflections() {
{term: '飲む', source: '飲む', rule: 'v5', reasons: []},
{term: '飲む', source: '飲みます', rule: 'v5', reasons: ['polite']},
{term: '飲む', source: '飲んだ', rule: 'v5', reasons: ['past']},
- {term: '飲む', source: '飲みました', rule: 'v5', reasons: ['polite past']},
+ {term: '飲む', source: '飲みました', rule: 'v5', reasons: ['polite', 'past']},
{term: '飲む', source: '飲んで', rule: 'v5', reasons: ['-te']},
{term: '飲む', source: '飲める', rule: 'v5', reasons: ['potential']},
{term: '飲む', source: '飲まれる', rule: 'v5', reasons: ['passive']},
@@ -498,15 +506,16 @@ function testDeinflections() {
{term: '飲む', source: '飲ませられる', rule: 'v5', reasons: ['causative', 'potential or passive']},
{term: '飲む', source: '飲め', rule: 'v5', reasons: ['imperative']},
{term: '飲む', source: '飲まない', rule: 'v5', reasons: ['negative']},
- {term: '飲む', source: '飲みません', rule: 'v5', reasons: ['polite negative']},
+ {term: '飲む', source: '飲みません', rule: 'v5', reasons: ['polite', 'negative']},
{term: '飲む', source: '飲まなかった', rule: 'v5', reasons: ['negative', 'past']},
- {term: '飲む', source: '飲みませんでした', rule: 'v5', reasons: ['polite past negative']},
+ {term: '飲む', source: '飲みませんでした', rule: 'v5', reasons: ['polite', 'negative', 'past']},
{term: '飲む', source: '飲まなくて', rule: 'v5', reasons: ['negative', '-te']},
{term: '飲む', source: '飲めない', rule: 'v5', reasons: ['potential', 'negative']},
{term: '飲む', source: '飲まれない', rule: 'v5', reasons: ['passive', 'negative']},
{term: '飲む', source: '飲ませない', rule: 'v5', reasons: ['causative', 'negative']},
{term: '飲む', source: '飲ませられない', rule: 'v5', reasons: ['causative', 'potential or passive', 'negative']},
{term: '飲む', source: '飲むな', rule: 'v5', reasons: ['imperative negative']},
+ {term: '飲む', source: '飲みまして', rule: 'v5', reasons: ['polite', '-te']},
{term: '飲む', source: '飲めば', rule: 'v5', reasons: ['-ba']},
{term: '飲む', source: '飲んじゃう', rule: 'v5', reasons: ['-chau']},
@@ -522,7 +531,7 @@ function testDeinflections() {
{term: '飲む', source: '飲まざる', rule: 'v5', reasons: ['-zaru']},
{term: '飲む', source: '飲まねば', rule: 'v5', reasons: ['-neba']},
{term: '飲む', source: '飲み', rule: 'v5', reasons: ['masu stem']},
- {term: '飲む', source: '飲みましょう', rule: 'v5', reasons: ['polite volitional']},
+ {term: '飲む', source: '飲みましょう', rule: 'v5', reasons: ['polite', 'volitional']},
{term: '飲む', source: '飲もう', rule: 'v5', reasons: ['volitional']},
{term: '飲む', source: '飲まされる', rule: 'v5', reasons: ['causative passive']},
{term: '飲む', source: '飲んどく', rule: 'v5', reasons: ['-toku']},
@@ -539,7 +548,7 @@ function testDeinflections() {
{term: '作る', source: '作る', rule: 'v5', reasons: []},
{term: '作る', source: '作ります', rule: 'v5', reasons: ['polite']},
{term: '作る', source: '作った', rule: 'v5', reasons: ['past']},
- {term: '作る', source: '作りました', rule: 'v5', reasons: ['polite past']},
+ {term: '作る', source: '作りました', rule: 'v5', reasons: ['polite', 'past']},
{term: '作る', source: '作って', rule: 'v5', reasons: ['-te']},
{term: '作る', source: '作れる', rule: 'v5', reasons: ['potential']},
{term: '作る', source: '作られる', rule: 'v5', reasons: ['passive']},
@@ -547,15 +556,16 @@ function testDeinflections() {
{term: '作る', source: '作らせられる', rule: 'v5', reasons: ['causative', 'potential or passive']},
{term: '作る', source: '作れ', rule: 'v5', reasons: ['imperative']},
{term: '作る', source: '作らない', rule: 'v5', reasons: ['negative']},
- {term: '作る', source: '作りません', rule: 'v5', reasons: ['polite negative']},
+ {term: '作る', source: '作りません', rule: 'v5', reasons: ['polite', 'negative']},
{term: '作る', source: '作らなかった', rule: 'v5', reasons: ['negative', 'past']},
- {term: '作る', source: '作りませんでした', rule: 'v5', reasons: ['polite past negative']},
+ {term: '作る', source: '作りませんでした', rule: 'v5', reasons: ['polite', 'negative', 'past']},
{term: '作る', source: '作らなくて', rule: 'v5', reasons: ['negative', '-te']},
{term: '作る', source: '作れない', rule: 'v5', reasons: ['potential', 'negative']},
{term: '作る', source: '作られない', rule: 'v5', reasons: ['passive', 'negative']},
{term: '作る', source: '作らせない', rule: 'v5', reasons: ['causative', 'negative']},
{term: '作る', source: '作らせられない', rule: 'v5', reasons: ['causative', 'potential or passive', 'negative']},
{term: '作る', source: '作るな', rule: 'v5', reasons: ['imperative negative']},
+ {term: '作る', source: '作りまして', rule: 'v5', reasons: ['polite', '-te']},
{term: '作る', source: '作れば', rule: 'v5', reasons: ['-ba']},
{term: '作る', source: '作っちゃう', rule: 'v5', reasons: ['-chau']},
@@ -571,7 +581,7 @@ function testDeinflections() {
{term: '作る', source: '作らざる', rule: 'v5', reasons: ['-zaru']},
{term: '作る', source: '作らねば', rule: 'v5', reasons: ['-neba']},
{term: '作る', source: '作り', rule: 'v5', reasons: ['masu stem']},
- {term: '作る', source: '作りましょう', rule: 'v5', reasons: ['polite volitional']},
+ {term: '作る', source: '作りましょう', rule: 'v5', reasons: ['polite', 'volitional']},
{term: '作る', source: '作ろう', rule: 'v5', reasons: ['volitional']},
{term: '作る', source: '作らされる', rule: 'v5', reasons: ['causative passive']},
{term: '作る', source: '作っとく', rule: 'v5', reasons: ['-toku']},
@@ -589,7 +599,7 @@ function testDeinflections() {
{term: '為る', source: '為る', rule: 'vs', reasons: []},
{term: '為る', source: '為ます', rule: 'vs', reasons: ['polite']},
{term: '為る', source: '為た', rule: 'vs', reasons: ['past']},
- {term: '為る', source: '為ました', rule: 'vs', reasons: ['polite past']},
+ {term: '為る', source: '為ました', rule: 'vs', reasons: ['polite', 'past']},
{term: '為る', source: '為て', rule: 'vs', reasons: ['-te']},
{term: '為る', source: '為られる', rule: 'vs', reasons: ['potential or passive']},
{term: '為る', source: '為れる', rule: 'vs', reasons: ['passive']},
@@ -599,9 +609,9 @@ function testDeinflections() {
{term: '為る', source: '為させられる', rule: 'vs', reasons: ['causative', 'potential or passive']},
{term: '為る', source: '為ろ', rule: 'vs', reasons: ['imperative']},
{term: '為る', source: '為ない', rule: 'vs', reasons: ['negative']},
- {term: '為る', source: '為ません', rule: 'vs', reasons: ['polite negative']},
+ {term: '為る', source: '為ません', rule: 'vs', reasons: ['polite', 'negative']},
{term: '為る', source: '為なかった', rule: 'vs', reasons: ['negative', 'past']},
- {term: '為る', source: '為ませんでした', rule: 'vs', reasons: ['polite past negative']},
+ {term: '為る', source: '為ませんでした', rule: 'vs', reasons: ['polite', 'negative', 'past']},
{term: '為る', source: '為なくて', rule: 'vs', reasons: ['negative', '-te']},
{term: '為る', source: '為られない', rule: 'vs', reasons: ['potential or passive', 'negative']},
{term: '為る', source: '為れない', rule: 'vs', reasons: ['passive', 'negative']},
@@ -610,6 +620,7 @@ function testDeinflections() {
{term: '為る', source: '為せられない', rule: 'vs', reasons: ['causative', 'potential or passive', 'negative']},
{term: '為る', source: '為させられない', rule: 'vs', reasons: ['causative', 'potential or passive', 'negative']},
{term: '為る', source: '為るな', rule: 'vs', reasons: ['imperative negative']},
+ {term: '為る', source: '為まして', rule: 'vs', reasons: ['polite', '-te']},
{term: '為る', source: '為れば', rule: 'vs', reasons: ['-ba']},
{term: '為る', source: '為ちゃう', rule: 'vs', reasons: ['-chau']},
@@ -625,7 +636,7 @@ function testDeinflections() {
{term: '為る', source: '為ざる', rule: 'vs', reasons: ['-zaru']},
{term: '為る', source: '為ねば', rule: 'vs', reasons: ['-neba']},
// ['masu stem']
- {term: '為る', source: '為ましょう', rule: 'vs', reasons: ['polite volitional']},
+ {term: '為る', source: '為ましょう', rule: 'vs', reasons: ['polite', 'volitional']},
{term: '為る', source: '為よう', rule: 'vs', reasons: ['volitional']},
// ['causative passive']
{term: '為る', source: '為とく', rule: 'vs', reasons: ['-toku']},
@@ -638,7 +649,7 @@ function testDeinflections() {
{term: 'する', source: 'する', rule: 'vs', reasons: []},
{term: 'する', source: 'します', rule: 'vs', reasons: ['polite']},
{term: 'する', source: 'した', rule: 'vs', reasons: ['past']},
- {term: 'する', source: 'しました', rule: 'vs', reasons: ['polite past']},
+ {term: 'する', source: 'しました', rule: 'vs', reasons: ['polite', 'past']},
{term: 'する', source: 'して', rule: 'vs', reasons: ['-te']},
{term: 'する', source: 'できる', rule: 'vs', reasons: ['potential']},
{term: 'する', source: '出来る', rule: 'vs', reasons: ['potential']},
@@ -650,9 +661,9 @@ function testDeinflections() {
{term: 'する', source: 'せさせられる', rule: 'vs', reasons: ['causative', 'potential or passive']},
{term: 'する', source: 'しろ', rule: 'vs', reasons: ['imperative']},
{term: 'する', source: 'しない', rule: 'vs', reasons: ['negative']},
- {term: 'する', source: 'しません', rule: 'vs', reasons: ['polite negative']},
+ {term: 'する', source: 'しません', rule: 'vs', reasons: ['polite', 'negative']},
{term: 'する', source: 'しなかった', rule: 'vs', reasons: ['negative', 'past']},
- {term: 'する', source: 'しませんでした', rule: 'vs', reasons: ['polite past negative']},
+ {term: 'する', source: 'しませんでした', rule: 'vs', reasons: ['polite', 'negative', 'past']},
{term: 'する', source: 'しなくて', rule: 'vs', reasons: ['negative', '-te']},
{term: 'する', source: 'せられない', rule: 'vs', reasons: ['potential or passive', 'negative']},
{term: 'する', source: 'されない', rule: 'vs', reasons: ['passive', 'negative']},
@@ -661,6 +672,7 @@ function testDeinflections() {
{term: 'する', source: 'させられない', rule: 'vs', reasons: ['causative', 'potential or passive', 'negative']},
{term: 'する', source: 'せさせられない', rule: 'vs', reasons: ['causative', 'potential or passive', 'negative']},
{term: 'する', source: 'するな', rule: 'vs', reasons: ['imperative negative']},
+ {term: 'する', source: 'しまして', rule: 'vs', reasons: ['polite', '-te']},
{term: 'する', source: 'すれば', rule: 'vs', reasons: ['-ba']},
{term: 'する', source: 'しちゃう', rule: 'vs', reasons: ['-chau']},
@@ -676,7 +688,7 @@ function testDeinflections() {
{term: 'する', source: 'せざる', rule: 'vs', reasons: ['-zaru']},
{term: 'する', source: 'せねば', rule: 'vs', reasons: ['-neba']},
// ['masu stem']
- {term: 'する', source: 'しましょう', rule: 'vs', reasons: ['polite volitional']},
+ {term: 'する', source: 'しましょう', rule: 'vs', reasons: ['polite', 'volitional']},
{term: 'する', source: 'しよう', rule: 'vs', reasons: ['volitional']},
// ['causative passive']
{term: 'する', source: 'しとく', rule: 'vs', reasons: ['-toku']},
@@ -689,7 +701,7 @@ function testDeinflections() {
{term: '来る', source: '来る', rule: 'vk', reasons: []},
{term: '来る', source: '来ます', rule: 'vk', reasons: ['polite']},
{term: '来る', source: '来た', rule: 'vk', reasons: ['past']},
- {term: '来る', source: '来ました', rule: 'vk', reasons: ['polite past']},
+ {term: '来る', source: '来ました', rule: 'vk', reasons: ['polite', 'past']},
{term: '来る', source: '来て', rule: 'vk', reasons: ['-te']},
{term: '来る', source: '来られる', rule: 'vk', reasons: ['potential or passive']},
{term: '来る', source: '来られる', rule: 'vk', reasons: ['potential or passive']},
@@ -697,15 +709,16 @@ function testDeinflections() {
{term: '来る', source: '来させられる', rule: 'vk', reasons: ['causative', 'potential or passive']},
{term: '来る', source: '来い', rule: 'vk', reasons: ['imperative']},
{term: '来る', source: '来ない', rule: 'vk', reasons: ['negative']},
- {term: '来る', source: '来ません', rule: 'vk', reasons: ['polite negative']},
+ {term: '来る', source: '来ません', rule: 'vk', reasons: ['polite', 'negative']},
{term: '来る', source: '来なかった', rule: 'vk', reasons: ['negative', 'past']},
- {term: '来る', source: '来ませんでした', rule: 'vk', reasons: ['polite past negative']},
+ {term: '来る', source: '来ませんでした', rule: 'vk', reasons: ['polite', 'negative', 'past']},
{term: '来る', source: '来なくて', rule: 'vk', reasons: ['negative', '-te']},
{term: '来る', source: '来られない', rule: 'vk', reasons: ['potential or passive', 'negative']},
{term: '来る', source: '来られない', rule: 'vk', reasons: ['potential or passive', 'negative']},
{term: '来る', source: '来させない', rule: 'vk', reasons: ['causative', 'negative']},
{term: '来る', source: '来させられない', rule: 'vk', reasons: ['causative', 'potential or passive', 'negative']},
{term: '来る', source: '来るな', rule: 'vk', reasons: ['imperative negative']},
+ {term: '来る', source: '来まして', rule: 'vk', reasons: ['polite', '-te']},
{term: '来る', source: '来れば', rule: 'vk', reasons: ['-ba']},
{term: '来る', source: '来ちゃう', rule: 'vk', reasons: ['-chau']},
@@ -721,7 +734,7 @@ function testDeinflections() {
{term: '来る', source: '来ざる', rule: 'vk', reasons: ['-zaru']},
{term: '来る', source: '来ねば', rule: 'vk', reasons: ['-neba']},
{term: '来る', source: '来', rule: 'vk', reasons: ['masu stem']},
- {term: '来る', source: '来ましょう', rule: 'vk', reasons: ['polite volitional']},
+ {term: '来る', source: '来ましょう', rule: 'vk', reasons: ['polite', 'volitional']},
{term: '来る', source: '来よう', rule: 'vk', reasons: ['volitional']},
// ['causative passive']
{term: '来る', source: '来とく', rule: 'vk', reasons: ['-toku']},
@@ -734,7 +747,7 @@ function testDeinflections() {
{term: '來る', source: '來る', rule: 'vk', reasons: []},
{term: '來る', source: '來ます', rule: 'vk', reasons: ['polite']},
{term: '來る', source: '來た', rule: 'vk', reasons: ['past']},
- {term: '來る', source: '來ました', rule: 'vk', reasons: ['polite past']},
+ {term: '來る', source: '來ました', rule: 'vk', reasons: ['polite', 'past']},
{term: '來る', source: '來て', rule: 'vk', reasons: ['-te']},
{term: '來る', source: '來られる', rule: 'vk', reasons: ['potential or passive']},
{term: '來る', source: '來られる', rule: 'vk', reasons: ['potential or passive']},
@@ -742,15 +755,16 @@ function testDeinflections() {
{term: '來る', source: '來させられる', rule: 'vk', reasons: ['causative', 'potential or passive']},
{term: '來る', source: '來い', rule: 'vk', reasons: ['imperative']},
{term: '來る', source: '來ない', rule: 'vk', reasons: ['negative']},
- {term: '來る', source: '來ません', rule: 'vk', reasons: ['polite negative']},
+ {term: '來る', source: '來ません', rule: 'vk', reasons: ['polite', 'negative']},
{term: '來る', source: '來なかった', rule: 'vk', reasons: ['negative', 'past']},
- {term: '來る', source: '來ませんでした', rule: 'vk', reasons: ['polite past negative']},
+ {term: '來る', source: '來ませんでした', rule: 'vk', reasons: ['polite', 'negative', 'past']},
{term: '來る', source: '來なくて', rule: 'vk', reasons: ['negative', '-te']},
{term: '來る', source: '來られない', rule: 'vk', reasons: ['potential or passive', 'negative']},
{term: '來る', source: '來られない', rule: 'vk', reasons: ['potential or passive', 'negative']},
{term: '來る', source: '來させない', rule: 'vk', reasons: ['causative', 'negative']},
{term: '來る', source: '來させられない', rule: 'vk', reasons: ['causative', 'potential or passive', 'negative']},
{term: '來る', source: '來るな', rule: 'vk', reasons: ['imperative negative']},
+ {term: '來る', source: '來まして', rule: 'vk', reasons: ['polite', '-te']},
{term: '來る', source: '來れば', rule: 'vk', reasons: ['-ba']},
{term: '來る', source: '來ちゃう', rule: 'vk', reasons: ['-chau']},
@@ -766,7 +780,7 @@ function testDeinflections() {
{term: '來る', source: '來ざる', rule: 'vk', reasons: ['-zaru']},
{term: '來る', source: '來ねば', rule: 'vk', reasons: ['-neba']},
{term: '來る', source: '來', rule: 'vk', reasons: ['masu stem']},
- {term: '來る', source: '來ましょう', rule: 'vk', reasons: ['polite volitional']},
+ {term: '來る', source: '來ましょう', rule: 'vk', reasons: ['polite', 'volitional']},
{term: '來る', source: '來よう', rule: 'vk', reasons: ['volitional']},
// ['causative passive']
{term: '來る', source: '來とく', rule: 'vk', reasons: ['-toku']},
@@ -779,7 +793,7 @@ function testDeinflections() {
{term: 'くる', source: 'くる', rule: 'vk', reasons: []},
{term: 'くる', source: 'きます', rule: 'vk', reasons: ['polite']},
{term: 'くる', source: 'きた', rule: 'vk', reasons: ['past']},
- {term: 'くる', source: 'きました', rule: 'vk', reasons: ['polite past']},
+ {term: 'くる', source: 'きました', rule: 'vk', reasons: ['polite', 'past']},
{term: 'くる', source: 'きて', rule: 'vk', reasons: ['-te']},
{term: 'くる', source: 'こられる', rule: 'vk', reasons: ['potential or passive']},
{term: 'くる', source: 'こられる', rule: 'vk', reasons: ['potential or passive']},
@@ -787,15 +801,16 @@ function testDeinflections() {
{term: 'くる', source: 'こさせられる', rule: 'vk', reasons: ['causative', 'potential or passive']},
{term: 'くる', source: 'こい', rule: 'vk', reasons: ['imperative']},
{term: 'くる', source: 'こない', rule: 'vk', reasons: ['negative']},
- {term: 'くる', source: 'きません', rule: 'vk', reasons: ['polite negative']},
+ {term: 'くる', source: 'きません', rule: 'vk', reasons: ['polite', 'negative']},
{term: 'くる', source: 'こなかった', rule: 'vk', reasons: ['negative', 'past']},
- {term: 'くる', source: 'きませんでした', rule: 'vk', reasons: ['polite past negative']},
+ {term: 'くる', source: 'きませんでした', rule: 'vk', reasons: ['polite', 'negative', 'past']},
{term: 'くる', source: 'こなくて', rule: 'vk', reasons: ['negative', '-te']},
{term: 'くる', source: 'こられない', rule: 'vk', reasons: ['potential or passive', 'negative']},
{term: 'くる', source: 'こられない', rule: 'vk', reasons: ['potential or passive', 'negative']},
{term: 'くる', source: 'こさせない', rule: 'vk', reasons: ['causative', 'negative']},
{term: 'くる', source: 'こさせられない', rule: 'vk', reasons: ['causative', 'potential or passive', 'negative']},
{term: 'くる', source: 'くるな', rule: 'vk', reasons: ['imperative negative']},
+ {term: 'くる', source: 'きまして', rule: 'vk', reasons: ['polite', '-te']},
{term: 'くる', source: 'くれば', rule: 'vk', reasons: ['-ba']},
{term: 'くる', source: 'きちゃう', rule: 'vk', reasons: ['-chau']},
@@ -811,7 +826,7 @@ function testDeinflections() {
{term: 'くる', source: 'こざる', rule: 'vk', reasons: ['-zaru']},
{term: 'くる', source: 'こねば', rule: 'vk', reasons: ['-neba']},
{term: 'くる', source: 'き', rule: 'vk', reasons: ['masu stem']},
- {term: 'くる', source: 'きましょう', rule: 'vk', reasons: ['polite volitional']},
+ {term: 'くる', source: 'きましょう', rule: 'vk', reasons: ['polite', 'volitional']},
{term: 'くる', source: 'こよう', rule: 'vk', reasons: ['volitional']},
// ['causative passive']
{term: 'くる', source: 'きとく', rule: 'vk', reasons: ['-toku']},
@@ -829,7 +844,7 @@ function testDeinflections() {
{term: '論ずる', source: '論ずる', rule: 'vz', reasons: []},
{term: '論ずる', source: '論じます', rule: 'vz', reasons: ['polite']},
{term: '論ずる', source: '論じた', rule: 'vz', reasons: ['past']},
- {term: '論ずる', source: '論じました', rule: 'vz', reasons: ['polite past']},
+ {term: '論ずる', source: '論じました', rule: 'vz', reasons: ['polite', 'past']},
{term: '論ずる', source: '論じて', rule: 'vz', reasons: ['-te']},
{term: '論ずる', source: '論ぜられる', rule: 'vz', reasons: ['potential or passive']},
{term: '論ずる', source: '論ざれる', rule: 'vz', reasons: ['potential or passive']},
@@ -841,9 +856,9 @@ function testDeinflections() {
{term: '論ずる', source: '論ぜさせられる', rule: 'vz', reasons: ['causative', 'potential or passive']},
{term: '論ずる', source: '論じろ', rule: 'vz', reasons: ['imperative']},
{term: '論ずる', source: '論じない', rule: 'vz', reasons: ['negative']},
- {term: '論ずる', source: '論じません', rule: 'vz', reasons: ['polite negative']},
+ {term: '論ずる', source: '論じません', rule: 'vz', reasons: ['polite', 'negative']},
{term: '論ずる', source: '論じなかった', rule: 'vz', reasons: ['negative', 'past']},
- {term: '論ずる', source: '論じませんでした', rule: 'vz', reasons: ['polite past negative']},
+ {term: '論ずる', source: '論じませんでした', rule: 'vz', reasons: ['polite', 'negative', 'past']},
{term: '論ずる', source: '論じなくて', rule: 'vz', reasons: ['negative', '-te']},
{term: '論ずる', source: '論ぜられない', rule: 'vz', reasons: ['potential or passive', 'negative']},
{term: '論ずる', source: '論じされない', rule: 'vz', reasons: ['passive', 'negative']},
@@ -853,6 +868,7 @@ function testDeinflections() {
{term: '論ずる', source: '論じさせられない', rule: 'vz', reasons: ['causative', 'potential or passive', 'negative']},
{term: '論ずる', source: '論ぜさせられない', rule: 'vz', reasons: ['causative', 'potential or passive', 'negative']},
{term: '論ずる', source: '論ずるな', rule: 'vz', reasons: ['imperative negative']},
+ {term: '論ずる', source: '論じまして', rule: 'vz', reasons: ['polite', '-te']},
{term: '論ずる', source: '論ずれば', rule: 'vz', reasons: ['-ba']},
{term: '論ずる', source: '論じちゃう', rule: 'vz', reasons: ['-chau']},
@@ -868,7 +884,7 @@ function testDeinflections() {
{term: '論ずる', source: '論ぜざる', rule: 'vz', reasons: ['-zaru']},
{term: '論ずる', source: '論ぜねば', rule: 'vz', reasons: ['-neba']},
// ['masu stem']
- {term: '論ずる', source: '論じましょう', rule: 'vz', reasons: ['polite volitional']},
+ {term: '論ずる', source: '論じましょう', rule: 'vz', reasons: ['polite', 'volitional']},
{term: '論ずる', source: '論じよう', rule: 'vz', reasons: ['volitional']},
// ['causative passive']
{term: '論ずる', source: '論じとく', rule: 'vz', reasons: ['-toku']},
@@ -1044,7 +1060,7 @@ function testDeinflections() {
tests: [
{term: '抱き抱える', source: '抱き抱えていなければ', rule: 'v1', reasons: ['-te', 'progressive or perfect', 'negative', '-ba']},
{term: '抱きかかえる', source: '抱きかかえていなければ', rule: 'v1', reasons: ['-te', 'progressive or perfect', 'negative', '-ba']},
- {term: '打ち込む', source: '打ち込んでいませんでした', rule: 'v5', reasons: ['-te', 'progressive or perfect', 'polite past negative']},
+ {term: '打ち込む', source: '打ち込んでいませんでした', rule: 'v5', reasons: ['-te', 'progressive or perfect', 'polite', 'negative', 'past']},
{term: '食べる', source: '食べさせられたくなかった', rule: 'v1', reasons: ['causative', 'potential or passive', '-tai', 'negative', 'past']}
]
},