From 01d18b35ab0fc5c54ed499c8581453fc04962a79 Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Sun, 1 Sep 2024 12:57:55 +0700 Subject: [PATCH 1/6] refactor masu form --- ext/js/language/ja/japanese-transforms.js | 98 ++++++++++++----------- 1 file changed, 53 insertions(+), 45 deletions(-) diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index 0c59115d56..299a085b85 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -76,7 +76,7 @@ const conditions = { }, ], isDictionaryForm: true, - subConditions: ['v5d', 'v5m', 'v5s'], + subConditions: ['v5d', 'v5s'], }, 'v5d': { name: 'Godan verb, dictionary form', @@ -88,10 +88,6 @@ const conditions = { ], isDictionaryForm: false, }, - 'v5m': { - name: 'Godan verb, polite (masu) form', - isDictionaryForm: false, - }, 'v5s': { name: 'Godan verb, short causative form', isDictionaryForm: false, @@ -136,6 +132,14 @@ const conditions = { ], isDictionaryForm: true, }, + '-masu': { + name: 'Polite -masu ending', + isDictionaryForm: false, + }, + '-masen': { + name: 'Polite negative -masen ending', + isDictionaryForm: false, + }, '-te': { name: 'Intermediate -te endings for progressive or perfect tense', isDictionaryForm: false, @@ -194,6 +198,8 @@ export const japaneseTransforms = { suffixInflection('べば', 'ぶ', ['-ba'], ['v5']), suffixInflection('めば', 'む', ['-ba'], ['v5']), suffixInflection('れば', 'る', ['-ba'], ['v1', 'v5', 'vk', 'vs', 'vz']), + suffixInflection('ませば', 'ます', ['-ba'], ['-masu']), + suffixInflection('ますれば', 'ます', ['-ba'], ['-masu']), ], }, '-ya': { @@ -535,6 +541,7 @@ export const japaneseTransforms = { suffixInflection('副うたら', '副う', [], ['v5']), suffixInflection('厭うたら', '厭う', [], ['v5']), suffixInflection('のたもうたら', 'のたまう', [], ['v5']), + suffixInflection('ましたら', 'ます', [], ['-masu']), ], }, '-tari': { @@ -635,7 +642,7 @@ export const japaneseTransforms = { suffixInflection('副うて', '副う', ['-te'], ['v5']), suffixInflection('厭うて', '厭う', ['-te'], ['v5']), suffixInflection('のたもうて', 'のたまう', ['-te'], ['v5']), - suffixInflection('まして', 'ます', [], ['v']), + suffixInflection('まして', 'ます', [], ['-masu']), ], }, '-zu': { @@ -731,7 +738,7 @@ export const japaneseTransforms = { ], }, '-n past': { - name: '-n', + name: '-n past', description: 'Past negative form of verbs; a sound change of ぬ.\n' + 'Usage: Attach んかった to the irrealis form (mizenkei) of verbs.\n' + 'する becomes せんかった', @@ -743,23 +750,23 @@ export const japaneseTransforms = { }, ], rules: [ - suffixInflection('んかった', 'る', [], ['v1']), - suffixInflection('かんかった', 'く', [], ['v5']), - suffixInflection('がんかった', 'ぐ', [], ['v5']), - suffixInflection('さんかった', 'す', [], ['v5']), - suffixInflection('たんかった', 'つ', [], ['v5']), - suffixInflection('なんかった', 'ぬ', [], ['v5']), - suffixInflection('ばんかった', 'ぶ', [], ['v5']), - suffixInflection('まんかった', 'む', [], ['v5']), - suffixInflection('らんかった', 'る', [], ['v5']), - suffixInflection('わんかった', 'う', [], ['v5']), - suffixInflection('ぜんかった', 'ずる', [], ['vz']), - suffixInflection('せんかった', 'する', [], ['vs']), - suffixInflection('為んかった', '為る', [], ['vs']), - suffixInflection('こんかった', 'くる', [], ['vk']), - suffixInflection('来んかった', '来る', [], ['vk']), - suffixInflection('來んかった', '來る', [], ['vk']), - suffixInflection('ませんかった', 'ません', [], ['v']), + suffixInflection('んかった', 'る', ['past'], ['v1']), + suffixInflection('かんかった', 'く', ['past'], ['v5']), + suffixInflection('がんかった', 'ぐ', ['past'], ['v5']), + suffixInflection('さんかった', 'す', ['past'], ['v5']), + suffixInflection('たんかった', 'つ', ['past'], ['v5']), + suffixInflection('なんかった', 'ぬ', ['past'], ['v5']), + suffixInflection('ばんかった', 'ぶ', ['past'], ['v5']), + suffixInflection('まんかった', 'む', ['past'], ['v5']), + suffixInflection('らんかった', 'る', ['past'], ['v5']), + suffixInflection('わんかった', 'う', ['past'], ['v5']), + suffixInflection('ぜんかった', 'ずる', ['past'], ['vz']), + suffixInflection('せんかった', 'する', ['past'], ['vs']), + suffixInflection('為んかった', '為る', ['past'], ['vs']), + suffixInflection('こんかった', 'くる', ['past'], ['vk']), + suffixInflection('来んかった', '来る', ['past'], ['vk']), + suffixInflection('來んかった', '來る', ['past'], ['vk']), + suffixInflection('かった', '', ['past'], ['-masen']), ], }, '-nbakari': { @@ -1090,7 +1097,7 @@ export const japaneseTransforms = { suffixInflection('こない', 'くる', ['adj-i'], ['vk']), suffixInflection('来ない', '来る', ['adj-i'], ['vk']), suffixInflection('來ない', '來る', ['adj-i'], ['vk']), - suffixInflection('ません', 'ます', ['v'], ['v']), + suffixInflection('ません', 'ます', ['-masen'], ['-masu']), ], }, '-sa': { @@ -1188,8 +1195,8 @@ export const japaneseTransforms = { suffixInflection('副うた', '副う', ['past'], ['v5']), suffixInflection('厭うた', '厭う', ['past'], ['v5']), suffixInflection('のたもうた', 'のたまう', ['past'], ['v5']), - suffixInflection('ました', 'ます', ['past'], ['v']), - suffixInflection('ませんでした', 'ません', ['past'], ['v']), + suffixInflection('ました', 'ます', ['past'], ['-masu']), + suffixInflection('でした', '', ['past'], ['-masen']), ], }, '-masu': { @@ -1203,23 +1210,23 @@ export const japaneseTransforms = { }, ], rules: [ - suffixInflection('ます', 'る', ['v1'], ['v1']), - suffixInflection('います', 'う', ['v5m'], ['v5d', 'v5s']), - suffixInflection('きます', 'く', ['v5m'], ['v5d', 'v5s']), - suffixInflection('ぎます', 'ぐ', ['v5m'], ['v5d', 'v5s']), - suffixInflection('します', 'す', ['v5m'], ['v5d', 'v5s']), - suffixInflection('ちます', 'つ', ['v5m'], ['v5d', 'v5s']), - suffixInflection('にます', 'ぬ', ['v5m'], ['v5d', 'v5s']), - suffixInflection('びます', 'ぶ', ['v5m'], ['v5d', 'v5s']), - suffixInflection('みます', 'む', ['v5m'], ['v5d', 'v5s']), - suffixInflection('ります', 'る', ['v5m'], ['v5d', 'v5s']), - suffixInflection('じます', 'ずる', ['vz'], ['vz']), - suffixInflection('します', 'する', ['vs'], ['vs']), - suffixInflection('為ます', '為る', ['vs'], ['vs']), - suffixInflection('きます', 'くる', ['vk'], ['vk']), - suffixInflection('来ます', '来る', ['vk'], ['vk']), - suffixInflection('來ます', '來る', ['vk'], ['vk']), - suffixInflection('くあります', 'い', ['v'], ['adj-i']), + suffixInflection('ます', 'る', ['-masu'], ['v1']), + suffixInflection('います', 'う', ['-masu'], ['v5d', 'v5s']), + suffixInflection('きます', 'く', ['-masu'], ['v5d', 'v5s']), + suffixInflection('ぎます', 'ぐ', ['-masu'], ['v5d', 'v5s']), + suffixInflection('します', 'す', ['-masu'], ['v5d', 'v5s']), + suffixInflection('ちます', 'つ', ['-masu'], ['v5d', 'v5s']), + suffixInflection('にます', 'ぬ', ['-masu'], ['v5d', 'v5s']), + suffixInflection('びます', 'ぶ', ['-masu'], ['v5d', 'v5s']), + suffixInflection('みます', 'む', ['-masu'], ['v5d', 'v5s']), + suffixInflection('ります', 'る', ['-masu'], ['v5d', 'v5s']), + suffixInflection('じます', 'ずる', ['-masu'], ['vz']), + suffixInflection('します', 'する', ['-masu'], ['vs']), + suffixInflection('為ます', '為る', ['-masu'], ['vs']), + suffixInflection('きます', 'くる', ['-masu'], ['vk']), + suffixInflection('来ます', '来る', ['-masu'], ['vk']), + suffixInflection('來ます', '來る', ['-masu'], ['vk']), + suffixInflection('くあります', 'い', ['-masu'], ['adj-i']), ], }, 'potential': { @@ -1307,7 +1314,7 @@ export const japaneseTransforms = { suffixInflection('こよう', 'くる', [], ['vk']), suffixInflection('来よう', '来る', [], ['vk']), suffixInflection('來よう', '來る', [], ['vk']), - suffixInflection('ましょう', 'ます', [], ['v']), + suffixInflection('ましょう', 'ます', [], ['-masu']), suffixInflection('かろう', 'い', [], ['adj-i']), ], }, @@ -1336,6 +1343,7 @@ export const japaneseTransforms = { suffixInflection('こまい', 'くる', [], ['vk']), suffixInflection('来まい', '来る', [], ['vk']), suffixInflection('來まい', '來る', [], ['vk']), + suffixInflection('ますまい', 'ます', [], ['-masu']), ], }, 'causative-passive': { From 6be59d0cd629b2035a1f0230155866dfc5aa6eab Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Sun, 1 Sep 2024 13:29:46 +0700 Subject: [PATCH 2/6] normalize masu mai form --- ext/js/language/ja/japanese-transforms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index 299a085b85..ca2b7b5516 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -1343,7 +1343,7 @@ export const japaneseTransforms = { suffixInflection('こまい', 'くる', [], ['vk']), suffixInflection('来まい', '来る', [], ['vk']), suffixInflection('來まい', '來る', [], ['vk']), - suffixInflection('ますまい', 'ます', [], ['-masu']), + suffixInflection('まい', '', [], ['-masu']), ], }, 'causative-passive': { From 77704799024597854e8ea6ccb1b3fabf571a939d Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Sun, 1 Sep 2024 14:04:14 +0700 Subject: [PATCH 3/6] add tests --- .../japanese-language-transformer.bench.js | 15 ++++ ext/js/language/ja/japanese-transforms.js | 2 +- test/language/japanese-transforms.test.js | 84 +++++++++++++++++++ 3 files changed, 100 insertions(+), 1 deletion(-) diff --git a/benches/japanese-language-transformer.bench.js b/benches/japanese-language-transformer.bench.js index b9da14e5b1..dbc0d0388f 100644 --- a/benches/japanese-language-transformer.bench.js +++ b/benches/japanese-language-transformer.bench.js @@ -90,6 +90,11 @@ describe('japanese language transformer', () => { '食べん', '食べんかった', '食べんばかり', + '食べますまい', + '食べましたら', + '食べませば', + '食べますれば', + '食べませんかった', ]; const inflectionCombinations = [ @@ -151,6 +156,11 @@ describe('japanese language transformer', () => { 'こん', 'こんかった', 'こんばかり', + 'きますまい', + 'きましたら', + 'きませば', + 'きますれば', + 'きませんかった', ]; const suruInflections = [ @@ -210,6 +220,11 @@ describe('japanese language transformer', () => { 'せん', 'せんかった', 'せんばかり', + 'しますまい', + 'しましたら', + 'しませば', + 'しますれば', + 'しませんかった', ]; const kansaibenInflections = [ diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index ca2b7b5516..98f4b229d0 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -199,7 +199,7 @@ export const japaneseTransforms = { suffixInflection('めば', 'む', ['-ba'], ['v5']), suffixInflection('れば', 'る', ['-ba'], ['v1', 'v5', 'vk', 'vs', 'vz']), suffixInflection('ませば', 'ます', ['-ba'], ['-masu']), - suffixInflection('ますれば', 'ます', ['-ba'], ['-masu']), + suffixInflection('れば', '', ['-ba'], ['-masu']), ], }, '-ya': { diff --git a/test/language/japanese-transforms.test.js b/test/language/japanese-transforms.test.js index b2d3440ea5..7704a1a51a 100644 --- a/test/language/japanese-transforms.test.js +++ b/test/language/japanese-transforms.test.js @@ -171,6 +171,12 @@ const tests = [ {term: '買う', source: '買ってる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '買う', source: '買っとる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '買う', source: '買ってしまう', rule: 'v5', reasons: ['-te', '-shimau']}, + + {term: '買う', source: '買いますまい', rule: 'v5', reasons: ['-masu', '-mai']}, + {term: '買う', source: '買いましたら', rule: 'v5', reasons: ['-masu', '-tara']}, + {term: '買う', source: '買いませば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '買う', source: '買いますれば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '買う', source: '買いませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], }, { @@ -234,6 +240,12 @@ const tests = [ {term: '行く', source: '行ってる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '行く', source: '行っとる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '行く', source: '行ってしまう', rule: 'v5', reasons: ['-te', '-shimau']}, + + {term: '行く', source: '行きますまい', rule: 'v5', reasons: ['-masu', '-mai']}, + {term: '行く', source: '行きましたら', rule: 'v5', reasons: ['-masu', '-tara']}, + {term: '行く', source: '行きませば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '行く', source: '行きますれば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '行く', source: '行きませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], }, { @@ -296,6 +308,12 @@ const tests = [ {term: '泳ぐ', source: '泳いでおる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '泳ぐ', source: '泳いでる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '泳ぐ', source: '泳いでしまう', rule: 'v5', reasons: ['-te', '-shimau']}, + + {term: '泳ぐ', source: '泳ぎますまい', rule: 'v5', reasons: ['-masu', '-mai']}, + {term: '泳ぐ', source: '泳ぎましたら', rule: 'v5', reasons: ['-masu', '-tara']}, + {term: '泳ぐ', source: '泳ぎませば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '泳ぐ', source: '泳ぎますれば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '泳ぐ', source: '泳ぎませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], }, { @@ -362,6 +380,12 @@ const tests = [ {term: '増す', source: '増せん', rule: 'v5', reasons: ['potential', '-n']}, {term: '増す', source: '増せんかった', rule: 'v5', reasons: ['potential', '-n past']}, {term: '増す', source: '増せんばかり', rule: 'v5', reasons: ['potential', '-nbakari']}, + + {term: '話す', source: '話しますまい', rule: 'v5', reasons: ['-masu', '-mai']}, + {term: '話す', source: '話しましたら', rule: 'v5', reasons: ['-masu', '-tara']}, + {term: '話す', source: '話しませば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '話す', source: '話しますれば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '話す', source: '話しませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], }, { @@ -425,6 +449,12 @@ const tests = [ {term: '待つ', source: '待ってる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '待つ', source: '待っとる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '待つ', source: '待ってしまう', rule: 'v5', reasons: ['-te', '-shimau']}, + + {term: '待つ', source: '待ちますまい', rule: 'v5', reasons: ['-masu', '-mai']}, + {term: '待つ', source: '待ちましたら', rule: 'v5', reasons: ['-masu', '-tara']}, + {term: '待つ', source: '待ちませば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '待つ', source: '待ちますれば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '待つ', source: '待ちませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], }, { @@ -487,6 +517,12 @@ const tests = [ {term: '死ぬ', source: '死んでおる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '死ぬ', source: '死んでる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '死ぬ', source: '死んでしまう', rule: 'v5', reasons: ['-te', '-shimau']}, + + {term: '死ぬ', source: '死にますまい', rule: 'v5', reasons: ['-masu', '-mai']}, + {term: '死ぬ', source: '死にましたら', rule: 'v5', reasons: ['-masu', '-tara']}, + {term: '死ぬ', source: '死にませば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '死ぬ', source: '死にますれば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '死ぬ', source: '死にませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], }, { @@ -549,6 +585,12 @@ const tests = [ {term: '遊ぶ', source: '遊んでおる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '遊ぶ', source: '遊んでる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '遊ぶ', source: '遊んでしまう', rule: 'v5', reasons: ['-te', '-shimau']}, + + {term: '遊ぶ', source: '遊びますまい', rule: 'v5', reasons: ['-masu', '-mai']}, + {term: '遊ぶ', source: '遊びましたら', rule: 'v5', reasons: ['-masu', '-tara']}, + {term: '遊ぶ', source: '遊びませば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '遊ぶ', source: '遊びますれば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '遊ぶ', source: '遊びませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], }, { @@ -611,6 +653,12 @@ const tests = [ {term: '飲む', source: '飲んでおる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '飲む', source: '飲んでる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '飲む', source: '飲んでしまう', rule: 'v5', reasons: ['-te', '-shimau']}, + + {term: '飲む', source: '飲みますまい', rule: 'v5', reasons: ['-masu', '-mai']}, + {term: '飲む', source: '飲みましたら', rule: 'v5', reasons: ['-masu', '-tara']}, + {term: '飲む', source: '飲みませば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '飲む', source: '飲みますれば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '飲む', source: '飲みませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], }, { @@ -673,6 +721,12 @@ const tests = [ {term: '作る', source: '作ってる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '作る', source: '作っとる', rule: 'v5', reasons: ['-te', '-teiru']}, {term: '作る', source: '作ってしまう', rule: 'v5', reasons: ['-te', '-shimau']}, + + {term: '作る', source: '作りますまい', rule: 'v5', reasons: ['-masu', '-mai']}, + {term: '作る', source: '作りましたら', rule: 'v5', reasons: ['-masu', '-tara']}, + {term: '作る', source: '作りませば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '作る', source: '作りますれば', rule: 'v5', reasons: ['-masu', '-ba']}, + {term: '作る', source: '作りませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], }, { @@ -742,6 +796,12 @@ const tests = [ {term: '為る', source: '為とる', rule: 'vs', reasons: ['-te', '-teiru']}, {term: '為る', source: '為てしまう', rule: 'vs', reasons: ['-te', '-shimau']}, + {term: '為る', source: '為ますまい', rule: 'vs', reasons: ['-masu', '-mai']}, + {term: '為る', source: '為ましたら', rule: 'vs', reasons: ['-masu', '-tara']}, + {term: '為る', source: '為ませば', rule: 'vs', reasons: ['-masu', '-ba']}, + {term: '為る', source: '為ますれば', rule: 'vs', reasons: ['-masu', '-ba']}, + {term: '為る', source: '為ませんかった', rule: 'vs', reasons: ['-masu', 'negative', '-n past']}, + {term: 'する', source: 'する', rule: 'vs', reasons: []}, {term: 'する', source: 'します', rule: 'vs', reasons: ['-masu']}, {term: 'する', source: 'した', rule: 'vs', reasons: ['-ta']}, @@ -808,6 +868,12 @@ const tests = [ {term: 'する', source: 'しとる', rule: 'vs', reasons: ['-te', '-teiru']}, {term: 'する', source: 'してしまう', rule: 'vs', reasons: ['-te', '-shimau']}, + {term: 'する', source: 'しますまい', rule: 'vs', reasons: ['-masu', '-mai']}, + {term: 'する', source: 'しましたら', rule: 'vs', reasons: ['-masu', '-tara']}, + {term: 'する', source: 'しませば', rule: 'vs', reasons: ['-masu', '-ba']}, + {term: 'する', source: 'しますれば', rule: 'vs', reasons: ['-masu', '-ba']}, + {term: 'する', source: 'しませんかった', rule: 'vs', reasons: ['-masu', 'negative', '-n past']}, + {term: '来る', source: '来る', rule: 'vk', reasons: []}, {term: '来る', source: '来ます', rule: 'vk', reasons: ['-masu']}, {term: '来る', source: '来た', rule: 'vk', reasons: ['-ta']}, @@ -867,6 +933,12 @@ const tests = [ {term: '来る', source: '来とる', rule: 'vk', reasons: ['-te', '-teiru']}, {term: '来る', source: '来てしまう', rule: 'vk', reasons: ['-te', '-shimau']}, + {term: '来る', source: '来ますまい', rule: 'vk', reasons: ['-masu', '-mai']}, + {term: '来る', source: '来ましたら', rule: 'vk', reasons: ['-masu', '-tara']}, + {term: '来る', source: '来ませば', rule: 'vk', reasons: ['-masu', '-ba']}, + {term: '来る', source: '来ますれば', rule: 'vk', reasons: ['-masu', '-ba']}, + {term: '来る', source: '来ませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-n past']}, + {term: '來る', source: '來る', rule: 'vk', reasons: []}, {term: '來る', source: '來ます', rule: 'vk', reasons: ['-masu']}, {term: '來る', source: '來た', rule: 'vk', reasons: ['-ta']}, @@ -926,6 +998,12 @@ const tests = [ {term: '來る', source: '來とる', rule: 'vk', reasons: ['-te', '-teiru']}, {term: '來る', source: '來てしまう', rule: 'vk', reasons: ['-te', '-shimau']}, + {term: '來る', source: '來ますまい', rule: 'vk', reasons: ['-masu', '-mai']}, + {term: '來る', source: '來ましたら', rule: 'vk', reasons: ['-masu', '-tara']}, + {term: '來る', source: '來ませば', rule: 'vk', reasons: ['-masu', '-ba']}, + {term: '來る', source: '來ますれば', rule: 'vk', reasons: ['-masu', '-ba']}, + {term: '來る', source: '來ませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-n past']}, + {term: 'くる', source: 'くる', rule: 'vk', reasons: []}, {term: 'くる', source: 'きます', rule: 'vk', reasons: ['-masu']}, {term: 'くる', source: 'きた', rule: 'vk', reasons: ['-ta']}, @@ -984,6 +1062,12 @@ const tests = [ {term: 'くる', source: 'きてる', rule: 'vk', reasons: ['-te', '-teiru']}, {term: 'くる', source: 'きとる', rule: 'vk', reasons: ['-te', '-teiru']}, {term: 'くる', source: 'きてしまう', rule: 'vk', reasons: ['-te', '-shimau']}, + + {term: 'くる', source: 'きますまい', rule: 'vk', reasons: ['-masu', '-mai']}, + {term: 'くる', source: 'きましたら', rule: 'vk', reasons: ['-masu', '-tara']}, + {term: 'くる', source: 'きませば', rule: 'vk', reasons: ['-masu', '-ba']}, + {term: 'くる', source: 'きますれば', rule: 'vk', reasons: ['-masu', '-ba']}, + {term: 'くる', source: 'きませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-n past']}, ], }, { From adb0755540c8444d7b5e72f633c0fdda0bc04898 Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Sun, 1 Sep 2024 14:08:23 +0700 Subject: [PATCH 4/6] test false positives --- test/language/japanese-transforms.test.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/language/japanese-transforms.test.js b/test/language/japanese-transforms.test.js index 7704a1a51a..c9fe368049 100644 --- a/test/language/japanese-transforms.test.js +++ b/test/language/japanese-transforms.test.js @@ -1341,6 +1341,11 @@ const tests = [ {term: '食べる', source: '食べて', rule: null, reasons: ['-te', '-teiru', 'continuative']}, {term: 'なる', source: 'なりません', rule: null, reasons: ['-masu', 'potential', '-n']}, {term: '食べる', source: '食べさせられる', rule: null, reasons: ['short causative', 'potential', 'potential or passive']}, + {term: '食べる', source: '食べまさない', rule: null, reasons: ['-masu', 'negative']}, + {term: '食べる', source: '食べますな', rule: null, reasons: ['-masu', 'imperative negative']}, + {term: '食べる', source: '食べましたい', rule: null, reasons: ['-masu', '-tai']}, + {term: '済ます', source: '済ません', rule: null, reasons: ['-masu', 'negative']}, + {term: '済ます', source: '済ましょう', rule: null, reasons: ['-masu', 'volitional']}, ], }, // Kansai-ben From 1d92cfd0342380fc5ac4db835f8644b24c1ec647 Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Mon, 2 Sep 2024 22:07:15 +0700 Subject: [PATCH 5/6] remove maseba --- benches/japanese-language-transformer.bench.js | 3 --- ext/js/language/ja/japanese-transforms.js | 1 - test/language/japanese-transforms.test.js | 14 -------------- 3 files changed, 18 deletions(-) diff --git a/benches/japanese-language-transformer.bench.js b/benches/japanese-language-transformer.bench.js index dbc0d0388f..d300b0c791 100644 --- a/benches/japanese-language-transformer.bench.js +++ b/benches/japanese-language-transformer.bench.js @@ -92,7 +92,6 @@ describe('japanese language transformer', () => { '食べんばかり', '食べますまい', '食べましたら', - '食べませば', '食べますれば', '食べませんかった', ]; @@ -158,7 +157,6 @@ describe('japanese language transformer', () => { 'こんばかり', 'きますまい', 'きましたら', - 'きませば', 'きますれば', 'きませんかった', ]; @@ -222,7 +220,6 @@ describe('japanese language transformer', () => { 'せんばかり', 'しますまい', 'しましたら', - 'しませば', 'しますれば', 'しませんかった', ]; diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index 98f4b229d0..9230d9dc1a 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -198,7 +198,6 @@ export const japaneseTransforms = { suffixInflection('べば', 'ぶ', ['-ba'], ['v5']), suffixInflection('めば', 'む', ['-ba'], ['v5']), suffixInflection('れば', 'る', ['-ba'], ['v1', 'v5', 'vk', 'vs', 'vz']), - suffixInflection('ませば', 'ます', ['-ba'], ['-masu']), suffixInflection('れば', '', ['-ba'], ['-masu']), ], }, diff --git a/test/language/japanese-transforms.test.js b/test/language/japanese-transforms.test.js index c9fe368049..1d78b4ec63 100644 --- a/test/language/japanese-transforms.test.js +++ b/test/language/japanese-transforms.test.js @@ -174,7 +174,6 @@ const tests = [ {term: '買う', source: '買いますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '買う', source: '買いましたら', rule: 'v5', reasons: ['-masu', '-tara']}, - {term: '買う', source: '買いませば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '買う', source: '買いますれば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '買う', source: '買いませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], @@ -243,7 +242,6 @@ const tests = [ {term: '行く', source: '行きますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '行く', source: '行きましたら', rule: 'v5', reasons: ['-masu', '-tara']}, - {term: '行く', source: '行きませば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '行く', source: '行きますれば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '行く', source: '行きませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], @@ -311,7 +309,6 @@ const tests = [ {term: '泳ぐ', source: '泳ぎますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '泳ぐ', source: '泳ぎましたら', rule: 'v5', reasons: ['-masu', '-tara']}, - {term: '泳ぐ', source: '泳ぎませば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '泳ぐ', source: '泳ぎますれば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '泳ぐ', source: '泳ぎませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], @@ -383,7 +380,6 @@ const tests = [ {term: '話す', source: '話しますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '話す', source: '話しましたら', rule: 'v5', reasons: ['-masu', '-tara']}, - {term: '話す', source: '話しませば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '話す', source: '話しますれば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '話す', source: '話しませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], @@ -452,7 +448,6 @@ const tests = [ {term: '待つ', source: '待ちますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '待つ', source: '待ちましたら', rule: 'v5', reasons: ['-masu', '-tara']}, - {term: '待つ', source: '待ちませば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '待つ', source: '待ちますれば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '待つ', source: '待ちませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], @@ -520,7 +515,6 @@ const tests = [ {term: '死ぬ', source: '死にますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '死ぬ', source: '死にましたら', rule: 'v5', reasons: ['-masu', '-tara']}, - {term: '死ぬ', source: '死にませば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '死ぬ', source: '死にますれば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '死ぬ', source: '死にませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], @@ -588,7 +582,6 @@ const tests = [ {term: '遊ぶ', source: '遊びますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '遊ぶ', source: '遊びましたら', rule: 'v5', reasons: ['-masu', '-tara']}, - {term: '遊ぶ', source: '遊びませば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '遊ぶ', source: '遊びますれば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '遊ぶ', source: '遊びませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], @@ -656,7 +649,6 @@ const tests = [ {term: '飲む', source: '飲みますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '飲む', source: '飲みましたら', rule: 'v5', reasons: ['-masu', '-tara']}, - {term: '飲む', source: '飲みませば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '飲む', source: '飲みますれば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '飲む', source: '飲みませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], @@ -724,7 +716,6 @@ const tests = [ {term: '作る', source: '作りますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '作る', source: '作りましたら', rule: 'v5', reasons: ['-masu', '-tara']}, - {term: '作る', source: '作りませば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '作る', source: '作りますれば', rule: 'v5', reasons: ['-masu', '-ba']}, {term: '作る', source: '作りませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, ], @@ -798,7 +789,6 @@ const tests = [ {term: '為る', source: '為ますまい', rule: 'vs', reasons: ['-masu', '-mai']}, {term: '為る', source: '為ましたら', rule: 'vs', reasons: ['-masu', '-tara']}, - {term: '為る', source: '為ませば', rule: 'vs', reasons: ['-masu', '-ba']}, {term: '為る', source: '為ますれば', rule: 'vs', reasons: ['-masu', '-ba']}, {term: '為る', source: '為ませんかった', rule: 'vs', reasons: ['-masu', 'negative', '-n past']}, @@ -870,7 +860,6 @@ const tests = [ {term: 'する', source: 'しますまい', rule: 'vs', reasons: ['-masu', '-mai']}, {term: 'する', source: 'しましたら', rule: 'vs', reasons: ['-masu', '-tara']}, - {term: 'する', source: 'しませば', rule: 'vs', reasons: ['-masu', '-ba']}, {term: 'する', source: 'しますれば', rule: 'vs', reasons: ['-masu', '-ba']}, {term: 'する', source: 'しませんかった', rule: 'vs', reasons: ['-masu', 'negative', '-n past']}, @@ -935,7 +924,6 @@ const tests = [ {term: '来る', source: '来ますまい', rule: 'vk', reasons: ['-masu', '-mai']}, {term: '来る', source: '来ましたら', rule: 'vk', reasons: ['-masu', '-tara']}, - {term: '来る', source: '来ませば', rule: 'vk', reasons: ['-masu', '-ba']}, {term: '来る', source: '来ますれば', rule: 'vk', reasons: ['-masu', '-ba']}, {term: '来る', source: '来ませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-n past']}, @@ -1000,7 +988,6 @@ const tests = [ {term: '來る', source: '來ますまい', rule: 'vk', reasons: ['-masu', '-mai']}, {term: '來る', source: '來ましたら', rule: 'vk', reasons: ['-masu', '-tara']}, - {term: '來る', source: '來ませば', rule: 'vk', reasons: ['-masu', '-ba']}, {term: '來る', source: '來ますれば', rule: 'vk', reasons: ['-masu', '-ba']}, {term: '來る', source: '來ませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-n past']}, @@ -1065,7 +1052,6 @@ const tests = [ {term: 'くる', source: 'きますまい', rule: 'vk', reasons: ['-masu', '-mai']}, {term: 'くる', source: 'きましたら', rule: 'vk', reasons: ['-masu', '-tara']}, - {term: 'くる', source: 'きませば', rule: 'vk', reasons: ['-masu', '-ba']}, {term: 'くる', source: 'きますれば', rule: 'vk', reasons: ['-masu', '-ba']}, {term: 'くる', source: 'きませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-n past']}, ], From 1af6bc93691a2d06175af1cce4219e16c73c3792 Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Mon, 2 Sep 2024 22:23:46 +0700 Subject: [PATCH 6/6] change n past to n + ta --- ext/js/language/ja/japanese-transforms.js | 69 +++++++---------------- test/language/japanese-transforms.test.js | 64 ++++++++++----------- 2 files changed, 53 insertions(+), 80 deletions(-) diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index 9230d9dc1a..8d25286353 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -156,6 +156,10 @@ const conditions = { name: '-ta past form ending', isDictionaryForm: false, }, + '-n': { + name: '-n negative ending', + isDictionaryForm: false, + }, '-na': { name: 'Intermediate -na ending (imperative negative)', isDictionaryForm: false, @@ -718,54 +722,22 @@ export const japaneseTransforms = { }, ], rules: [ - suffixInflection('ん', 'る', [], ['v1']), - suffixInflection('かん', 'く', [], ['v5']), - suffixInflection('がん', 'ぐ', [], ['v5']), - suffixInflection('さん', 'す', [], ['v5']), - suffixInflection('たん', 'つ', [], ['v5']), - suffixInflection('なん', 'ぬ', [], ['v5']), - suffixInflection('ばん', 'ぶ', [], ['v5']), - suffixInflection('まん', 'む', [], ['v5']), - suffixInflection('らん', 'る', [], ['v5']), - suffixInflection('わん', 'う', [], ['v5']), - suffixInflection('ぜん', 'ずる', [], ['vz']), - suffixInflection('せん', 'する', [], ['vs']), - suffixInflection('為ん', '為る', [], ['vs']), - suffixInflection('こん', 'くる', [], ['vk']), - suffixInflection('来ん', '来る', [], ['vk']), - suffixInflection('來ん', '來る', [], ['vk']), - ], - }, - '-n past': { - name: '-n past', - description: 'Past negative form of verbs; a sound change of ぬ.\n' + - 'Usage: Attach んかった to the irrealis form (mizenkei) of verbs.\n' + - 'する becomes せんかった', - i18n: [ - { - language: 'ja', - name: '~んかった', - description: '打消の過去を示す。なかった。', - }, - ], - rules: [ - suffixInflection('んかった', 'る', ['past'], ['v1']), - suffixInflection('かんかった', 'く', ['past'], ['v5']), - suffixInflection('がんかった', 'ぐ', ['past'], ['v5']), - suffixInflection('さんかった', 'す', ['past'], ['v5']), - suffixInflection('たんかった', 'つ', ['past'], ['v5']), - suffixInflection('なんかった', 'ぬ', ['past'], ['v5']), - suffixInflection('ばんかった', 'ぶ', ['past'], ['v5']), - suffixInflection('まんかった', 'む', ['past'], ['v5']), - suffixInflection('らんかった', 'る', ['past'], ['v5']), - suffixInflection('わんかった', 'う', ['past'], ['v5']), - suffixInflection('ぜんかった', 'ずる', ['past'], ['vz']), - suffixInflection('せんかった', 'する', ['past'], ['vs']), - suffixInflection('為んかった', '為る', ['past'], ['vs']), - suffixInflection('こんかった', 'くる', ['past'], ['vk']), - suffixInflection('来んかった', '来る', ['past'], ['vk']), - suffixInflection('來んかった', '來る', ['past'], ['vk']), - suffixInflection('かった', '', ['past'], ['-masen']), + suffixInflection('ん', 'る', ['-n'], ['v1']), + suffixInflection('かん', 'く', ['-n'], ['v5']), + suffixInflection('がん', 'ぐ', ['-n'], ['v5']), + suffixInflection('さん', 'す', ['-n'], ['v5']), + suffixInflection('たん', 'つ', ['-n'], ['v5']), + suffixInflection('なん', 'ぬ', ['-n'], ['v5']), + suffixInflection('ばん', 'ぶ', ['-n'], ['v5']), + suffixInflection('まん', 'む', ['-n'], ['v5']), + suffixInflection('らん', 'る', ['-n'], ['v5']), + suffixInflection('わん', 'う', ['-n'], ['v5']), + suffixInflection('ぜん', 'ずる', ['-n'], ['vz']), + suffixInflection('せん', 'する', ['-n'], ['vs']), + suffixInflection('為ん', '為る', ['-n'], ['vs']), + suffixInflection('こん', 'くる', ['-n'], ['vk']), + suffixInflection('来ん', '来る', ['-n'], ['vk']), + suffixInflection('來ん', '來る', ['-n'], ['vk']), ], }, '-nbakari': { @@ -1196,6 +1168,7 @@ export const japaneseTransforms = { suffixInflection('のたもうた', 'のたまう', ['past'], ['v5']), suffixInflection('ました', 'ます', ['past'], ['-masu']), suffixInflection('でした', '', ['past'], ['-masen']), + suffixInflection('かった', '', ['past'], ['-masen', '-n']), ], }, '-masu': { diff --git a/test/language/japanese-transforms.test.js b/test/language/japanese-transforms.test.js index 1d78b4ec63..f71a5c513c 100644 --- a/test/language/japanese-transforms.test.js +++ b/test/language/japanese-transforms.test.js @@ -39,7 +39,7 @@ const tests = [ {term: '愛しい', source: '愛しかった', rule: 'adj-i', reasons: ['-ta']}, {term: '愛しい', source: '愛しくありません', rule: 'adj-i', reasons: ['-masu', 'negative']}, {term: '愛しい', source: '愛しくありませんでした', rule: 'adj-i', reasons: ['-masu', 'negative', '-ta']}, - {term: '愛しい', source: '愛しくありませんかった', rule: 'adj-i', reasons: ['-masu', 'negative', '-n past']}, + {term: '愛しい', source: '愛しくありませんかった', rule: 'adj-i', reasons: ['-masu', 'negative', '-ta']}, {term: '愛しい', source: '愛しき', rule: 'adj-i', reasons: ['-ki']}, {term: '愛しい', source: '愛しげ', rule: 'adj-i', reasons: ['-ge']}, {term: '愛しい', source: '愛し気', rule: 'adj-i', reasons: ['-ge']}, @@ -91,7 +91,7 @@ const tests = [ {term: '食べる', source: '食べず', rule: 'v1', reasons: ['-zu']}, {term: '食べる', source: '食べぬ', rule: 'v1', reasons: ['-nu']}, {term: '食べる', source: '食べん', rule: 'v1', reasons: ['-n']}, - {term: '食べる', source: '食べんかった', rule: 'v1', reasons: ['-n past']}, + {term: '食べる', source: '食べんかった', rule: 'v1', reasons: ['-n', '-ta']}, {term: '食べる', source: '食べんばかり', rule: 'v1', reasons: ['-nbakari']}, {term: '食べる', source: '食べざる', rule: 'v1', reasons: ['-zaru']}, {term: '食べる', source: '食べねば', rule: 'v1', reasons: ['-neba']}, @@ -155,7 +155,7 @@ const tests = [ {term: '買う', source: '買わず', rule: 'v5', reasons: ['-zu']}, {term: '買う', source: '買わぬ', rule: 'v5', reasons: ['-nu']}, {term: '買う', source: '買わん', rule: 'v5', reasons: ['-n']}, - {term: '買う', source: '買わんかった', rule: 'v5', reasons: ['-n past']}, + {term: '買う', source: '買わんかった', rule: 'v5', reasons: ['-n', '-ta']}, {term: '買う', source: '買わんばかり', rule: 'v5', reasons: ['-nbakari']}, {term: '買う', source: '買わざる', rule: 'v5', reasons: ['-zaru']}, {term: '買う', source: '買わねば', rule: 'v5', reasons: ['-neba']}, @@ -175,7 +175,7 @@ const tests = [ {term: '買う', source: '買いますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '買う', source: '買いましたら', rule: 'v5', reasons: ['-masu', '-tara']}, {term: '買う', source: '買いますれば', rule: 'v5', reasons: ['-masu', '-ba']}, - {term: '買う', source: '買いませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, + {term: '買う', source: '買いませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-ta']}, ], }, { @@ -223,7 +223,7 @@ const tests = [ {term: '行く', source: '行かず', rule: 'v5', reasons: ['-zu']}, {term: '行く', source: '行かぬ', rule: 'v5', reasons: ['-nu']}, {term: '行く', source: '行かん', rule: 'v5', reasons: ['-n']}, - {term: '行く', source: '行かんかった', rule: 'v5', reasons: ['-n past']}, + {term: '行く', source: '行かんかった', rule: 'v5', reasons: ['-n', '-ta']}, {term: '行く', source: '行かんばかり', rule: 'v5', reasons: ['-nbakari']}, {term: '行く', source: '行かざる', rule: 'v5', reasons: ['-zaru']}, {term: '行く', source: '行かねば', rule: 'v5', reasons: ['-neba']}, @@ -243,7 +243,7 @@ const tests = [ {term: '行く', source: '行きますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '行く', source: '行きましたら', rule: 'v5', reasons: ['-masu', '-tara']}, {term: '行く', source: '行きますれば', rule: 'v5', reasons: ['-masu', '-ba']}, - {term: '行く', source: '行きませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, + {term: '行く', source: '行きませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-ta']}, ], }, { @@ -291,7 +291,7 @@ const tests = [ {term: '泳ぐ', source: '泳がず', rule: 'v5', reasons: ['-zu']}, {term: '泳ぐ', source: '泳がぬ', rule: 'v5', reasons: ['-nu']}, {term: '泳ぐ', source: '泳がん', rule: 'v5', reasons: ['-n']}, - {term: '泳ぐ', source: '泳がんかった', rule: 'v5', reasons: ['-n past']}, + {term: '泳ぐ', source: '泳がんかった', rule: 'v5', reasons: ['-n', '-ta']}, {term: '泳ぐ', source: '泳がんばかり', rule: 'v5', reasons: ['-nbakari']}, {term: '泳ぐ', source: '泳がざる', rule: 'v5', reasons: ['-zaru']}, {term: '泳ぐ', source: '泳がねば', rule: 'v5', reasons: ['-neba']}, @@ -310,7 +310,7 @@ const tests = [ {term: '泳ぐ', source: '泳ぎますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '泳ぐ', source: '泳ぎましたら', rule: 'v5', reasons: ['-masu', '-tara']}, {term: '泳ぐ', source: '泳ぎますれば', rule: 'v5', reasons: ['-masu', '-ba']}, - {term: '泳ぐ', source: '泳ぎませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, + {term: '泳ぐ', source: '泳ぎませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-ta']}, ], }, { @@ -358,7 +358,7 @@ const tests = [ {term: '話す', source: '話さず', rule: 'v5', reasons: ['-zu']}, {term: '話す', source: '話さぬ', rule: 'v5', reasons: ['-nu']}, {term: '話す', source: '話さん', rule: 'v5', reasons: ['-n']}, - {term: '話す', source: '話さんかった', rule: 'v5', reasons: ['-n past']}, + {term: '話す', source: '話さんかった', rule: 'v5', reasons: ['-n', '-ta']}, {term: '話す', source: '話さざる', rule: 'v5', reasons: ['-zaru']}, {term: '話す', source: '話さねば', rule: 'v5', reasons: ['-neba']}, {term: '話す', source: '話さにゃ', rule: 'v5', reasons: ['-neba', '-ya']}, @@ -375,13 +375,13 @@ const tests = [ {term: '話す', source: '話してしまう', rule: 'v5', reasons: ['-te', '-shimau']}, {term: '増す', source: '増せん', rule: 'v5', reasons: ['potential', '-n']}, - {term: '増す', source: '増せんかった', rule: 'v5', reasons: ['potential', '-n past']}, + {term: '増す', source: '増せんかった', rule: 'v5', reasons: ['potential', '-n', '-ta']}, {term: '増す', source: '増せんばかり', rule: 'v5', reasons: ['potential', '-nbakari']}, {term: '話す', source: '話しますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '話す', source: '話しましたら', rule: 'v5', reasons: ['-masu', '-tara']}, {term: '話す', source: '話しますれば', rule: 'v5', reasons: ['-masu', '-ba']}, - {term: '話す', source: '話しませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, + {term: '話す', source: '話しませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-ta']}, ], }, { @@ -429,7 +429,7 @@ const tests = [ {term: '待つ', source: '待たず', rule: 'v5', reasons: ['-zu']}, {term: '待つ', source: '待たぬ', rule: 'v5', reasons: ['-nu']}, {term: '待つ', source: '待たん', rule: 'v5', reasons: ['-n']}, - {term: '待つ', source: '待たんかった', rule: 'v5', reasons: ['-n past']}, + {term: '待つ', source: '待たんかった', rule: 'v5', reasons: ['-n', '-ta']}, {term: '待つ', source: '待たんばかり', rule: 'v5', reasons: ['-nbakari']}, {term: '待つ', source: '待たざる', rule: 'v5', reasons: ['-zaru']}, {term: '待つ', source: '待たねば', rule: 'v5', reasons: ['-neba']}, @@ -449,7 +449,7 @@ const tests = [ {term: '待つ', source: '待ちますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '待つ', source: '待ちましたら', rule: 'v5', reasons: ['-masu', '-tara']}, {term: '待つ', source: '待ちますれば', rule: 'v5', reasons: ['-masu', '-ba']}, - {term: '待つ', source: '待ちませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, + {term: '待つ', source: '待ちませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-ta']}, ], }, { @@ -497,7 +497,7 @@ const tests = [ {term: '死ぬ', source: '死なず', rule: 'v5', reasons: ['-zu']}, {term: '死ぬ', source: '死なぬ', rule: 'v5', reasons: ['-nu']}, {term: '死ぬ', source: '死なん', rule: 'v5', reasons: ['-n']}, - {term: '死ぬ', source: '死なんかった', rule: 'v5', reasons: ['-n past']}, + {term: '死ぬ', source: '死なんかった', rule: 'v5', reasons: ['-n', '-ta']}, {term: '死ぬ', source: '死なんばかり', rule: 'v5', reasons: ['-nbakari']}, {term: '死ぬ', source: '死なざる', rule: 'v5', reasons: ['-zaru']}, {term: '死ぬ', source: '死なねば', rule: 'v5', reasons: ['-neba']}, @@ -516,7 +516,7 @@ const tests = [ {term: '死ぬ', source: '死にますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '死ぬ', source: '死にましたら', rule: 'v5', reasons: ['-masu', '-tara']}, {term: '死ぬ', source: '死にますれば', rule: 'v5', reasons: ['-masu', '-ba']}, - {term: '死ぬ', source: '死にませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, + {term: '死ぬ', source: '死にませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-ta']}, ], }, { @@ -564,7 +564,7 @@ const tests = [ {term: '遊ぶ', source: '遊ばず', rule: 'v5', reasons: ['-zu']}, {term: '遊ぶ', source: '遊ばぬ', rule: 'v5', reasons: ['-nu']}, {term: '遊ぶ', source: '遊ばん', rule: 'v5', reasons: ['-n']}, - {term: '遊ぶ', source: '遊ばんかった', rule: 'v5', reasons: ['-n past']}, + {term: '遊ぶ', source: '遊ばんかった', rule: 'v5', reasons: ['-n', '-ta']}, {term: '遊ぶ', source: '遊ばんばかり', rule: 'v5', reasons: ['-nbakari']}, {term: '遊ぶ', source: '遊ばざる', rule: 'v5', reasons: ['-zaru']}, {term: '遊ぶ', source: '遊ばねば', rule: 'v5', reasons: ['-neba']}, @@ -583,7 +583,7 @@ const tests = [ {term: '遊ぶ', source: '遊びますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '遊ぶ', source: '遊びましたら', rule: 'v5', reasons: ['-masu', '-tara']}, {term: '遊ぶ', source: '遊びますれば', rule: 'v5', reasons: ['-masu', '-ba']}, - {term: '遊ぶ', source: '遊びませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, + {term: '遊ぶ', source: '遊びませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-ta']}, ], }, { @@ -631,7 +631,7 @@ const tests = [ {term: '飲む', source: '飲まず', rule: 'v5', reasons: ['-zu']}, {term: '飲む', source: '飲まぬ', rule: 'v5', reasons: ['-nu']}, {term: '飲む', source: '飲まん', rule: 'v5', reasons: ['-n']}, - {term: '飲む', source: '飲まんかった', rule: 'v5', reasons: ['-n past']}, + {term: '飲む', source: '飲まんかった', rule: 'v5', reasons: ['-n', '-ta']}, {term: '飲む', source: '飲まんばかり', rule: 'v5', reasons: ['-nbakari']}, {term: '飲む', source: '飲まざる', rule: 'v5', reasons: ['-zaru']}, {term: '飲む', source: '飲まねば', rule: 'v5', reasons: ['-neba']}, @@ -650,7 +650,7 @@ const tests = [ {term: '飲む', source: '飲みますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '飲む', source: '飲みましたら', rule: 'v5', reasons: ['-masu', '-tara']}, {term: '飲む', source: '飲みますれば', rule: 'v5', reasons: ['-masu', '-ba']}, - {term: '飲む', source: '飲みませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, + {term: '飲む', source: '飲みませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-ta']}, ], }, { @@ -698,7 +698,7 @@ const tests = [ {term: '作る', source: '作らず', rule: 'v5', reasons: ['-zu']}, {term: '作る', source: '作らぬ', rule: 'v5', reasons: ['-nu']}, {term: '作る', source: '作らん', rule: 'v5', reasons: ['-n']}, - {term: '作る', source: '作らんかった', rule: 'v5', reasons: ['-n past']}, + {term: '作る', source: '作らんかった', rule: 'v5', reasons: ['-n', '-ta']}, {term: '作る', source: '作らざる', rule: 'v5', reasons: ['-zaru']}, {term: '作る', source: '作らねば', rule: 'v5', reasons: ['-neba']}, {term: '作る', source: '作らにゃ', rule: 'v5', reasons: ['-neba', '-ya']}, @@ -717,7 +717,7 @@ const tests = [ {term: '作る', source: '作りますまい', rule: 'v5', reasons: ['-masu', '-mai']}, {term: '作る', source: '作りましたら', rule: 'v5', reasons: ['-masu', '-tara']}, {term: '作る', source: '作りますれば', rule: 'v5', reasons: ['-masu', '-ba']}, - {term: '作る', source: '作りませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-n past']}, + {term: '作る', source: '作りませんかった', rule: 'v5', reasons: ['-masu', 'negative', '-ta']}, ], }, { @@ -769,7 +769,7 @@ const tests = [ {term: '為る', source: '為ず', rule: 'vs', reasons: ['-zu']}, {term: '為る', source: '為ぬ', rule: 'vs', reasons: ['-nu']}, {term: '為る', source: '為ん', rule: 'vs', reasons: ['-n']}, - {term: '為る', source: '為んかった', rule: 'vs', reasons: ['-n past']}, + {term: '為る', source: '為んかった', rule: 'vs', reasons: ['-n', '-ta']}, {term: '為る', source: '為んばかり', rule: 'vs', reasons: ['-nbakari']}, {term: '為る', source: '為ざる', rule: 'vs', reasons: ['-zaru']}, {term: '為る', source: '為ねば', rule: 'vs', reasons: ['-neba']}, @@ -790,7 +790,7 @@ const tests = [ {term: '為る', source: '為ますまい', rule: 'vs', reasons: ['-masu', '-mai']}, {term: '為る', source: '為ましたら', rule: 'vs', reasons: ['-masu', '-tara']}, {term: '為る', source: '為ますれば', rule: 'vs', reasons: ['-masu', '-ba']}, - {term: '為る', source: '為ませんかった', rule: 'vs', reasons: ['-masu', 'negative', '-n past']}, + {term: '為る', source: '為ませんかった', rule: 'vs', reasons: ['-masu', 'negative', '-ta']}, {term: 'する', source: 'する', rule: 'vs', reasons: []}, {term: 'する', source: 'します', rule: 'vs', reasons: ['-masu']}, @@ -839,7 +839,7 @@ const tests = [ {term: 'する', source: 'せず', rule: 'vs', reasons: ['-zu']}, {term: 'する', source: 'せぬ', rule: 'vs', reasons: ['-nu']}, {term: 'する', source: 'せん', rule: 'vs', reasons: ['-n']}, - {term: 'する', source: 'せんかった', rule: 'vs', reasons: ['-n past']}, + {term: 'する', source: 'せんかった', rule: 'vs', reasons: ['-n', '-ta']}, {term: 'する', source: 'せんばかり', rule: 'vs', reasons: ['-nbakari']}, {term: 'する', source: 'せざる', rule: 'vs', reasons: ['-zaru']}, {term: 'する', source: 'せねば', rule: 'vs', reasons: ['-neba']}, @@ -861,7 +861,7 @@ const tests = [ {term: 'する', source: 'しますまい', rule: 'vs', reasons: ['-masu', '-mai']}, {term: 'する', source: 'しましたら', rule: 'vs', reasons: ['-masu', '-tara']}, {term: 'する', source: 'しますれば', rule: 'vs', reasons: ['-masu', '-ba']}, - {term: 'する', source: 'しませんかった', rule: 'vs', reasons: ['-masu', 'negative', '-n past']}, + {term: 'する', source: 'しませんかった', rule: 'vs', reasons: ['-masu', 'negative', '-ta']}, {term: '来る', source: '来る', rule: 'vk', reasons: []}, {term: '来る', source: '来ます', rule: 'vk', reasons: ['-masu']}, @@ -904,7 +904,7 @@ const tests = [ {term: '来る', source: '来ず', rule: 'vk', reasons: ['-zu']}, {term: '来る', source: '来ぬ', rule: 'vk', reasons: ['-nu']}, {term: '来る', source: '来ん', rule: 'vk', reasons: ['-n']}, - {term: '来る', source: '来んかった', rule: 'vk', reasons: ['-n past']}, + {term: '来る', source: '来んかった', rule: 'vk', reasons: ['-n', '-ta']}, {term: '来る', source: '来んばかり', rule: 'vk', reasons: ['-nbakari']}, {term: '来る', source: '来ざる', rule: 'vk', reasons: ['-zaru']}, {term: '来る', source: '来ねば', rule: 'vk', reasons: ['-neba']}, @@ -925,7 +925,7 @@ const tests = [ {term: '来る', source: '来ますまい', rule: 'vk', reasons: ['-masu', '-mai']}, {term: '来る', source: '来ましたら', rule: 'vk', reasons: ['-masu', '-tara']}, {term: '来る', source: '来ますれば', rule: 'vk', reasons: ['-masu', '-ba']}, - {term: '来る', source: '来ませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-n past']}, + {term: '来る', source: '来ませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-ta']}, {term: '來る', source: '來る', rule: 'vk', reasons: []}, {term: '來る', source: '來ます', rule: 'vk', reasons: ['-masu']}, @@ -968,7 +968,7 @@ const tests = [ {term: '來る', source: '來ず', rule: 'vk', reasons: ['-zu']}, {term: '來る', source: '來ぬ', rule: 'vk', reasons: ['-nu']}, {term: '來る', source: '來ん', rule: 'vk', reasons: ['-n']}, - {term: '來る', source: '來んかった', rule: 'vk', reasons: ['-n past']}, + {term: '來る', source: '來んかった', rule: 'vk', reasons: ['-n', '-ta']}, {term: '來る', source: '來んばかり', rule: 'vk', reasons: ['-nbakari']}, {term: '來る', source: '來ざる', rule: 'vk', reasons: ['-zaru']}, {term: '來る', source: '來ねば', rule: 'vk', reasons: ['-neba']}, @@ -989,7 +989,7 @@ const tests = [ {term: '來る', source: '來ますまい', rule: 'vk', reasons: ['-masu', '-mai']}, {term: '來る', source: '來ましたら', rule: 'vk', reasons: ['-masu', '-tara']}, {term: '來る', source: '來ますれば', rule: 'vk', reasons: ['-masu', '-ba']}, - {term: '來る', source: '來ませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-n past']}, + {term: '來る', source: '來ませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-ta']}, {term: 'くる', source: 'くる', rule: 'vk', reasons: []}, {term: 'くる', source: 'きます', rule: 'vk', reasons: ['-masu']}, @@ -1032,7 +1032,7 @@ const tests = [ {term: 'くる', source: 'こず', rule: 'vk', reasons: ['-zu']}, {term: 'くる', source: 'こぬ', rule: 'vk', reasons: ['-nu']}, {term: 'くる', source: 'こん', rule: 'vk', reasons: ['-n']}, - {term: 'くる', source: 'こんかった', rule: 'vk', reasons: ['-n past']}, + {term: 'くる', source: 'こんかった', rule: 'vk', reasons: ['-n', '-ta']}, {term: 'くる', source: 'こんばかり', rule: 'vk', reasons: ['-nbakari']}, {term: 'くる', source: 'こざる', rule: 'vk', reasons: ['-zaru']}, {term: 'くる', source: 'こねば', rule: 'vk', reasons: ['-neba']}, @@ -1053,7 +1053,7 @@ const tests = [ {term: 'くる', source: 'きますまい', rule: 'vk', reasons: ['-masu', '-mai']}, {term: 'くる', source: 'きましたら', rule: 'vk', reasons: ['-masu', '-tara']}, {term: 'くる', source: 'きますれば', rule: 'vk', reasons: ['-masu', '-ba']}, - {term: 'くる', source: 'きませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-n past']}, + {term: 'くる', source: 'きませんかった', rule: 'vk', reasons: ['-masu', 'negative', '-ta']}, ], }, { @@ -1111,7 +1111,7 @@ const tests = [ {term: '論ずる', source: '論ぜず', rule: 'vz', reasons: ['-zu']}, {term: '論ずる', source: '論ぜぬ', rule: 'vz', reasons: ['-nu']}, {term: '論ずる', source: '論ぜん', rule: 'vz', reasons: ['-n']}, - {term: '論ずる', source: '論ぜんかった', rule: 'vz', reasons: ['-n past']}, + {term: '論ずる', source: '論ぜんかった', rule: 'vz', reasons: ['-n', '-ta']}, {term: '論ずる', source: '論ぜんばかり', rule: 'vz', reasons: ['-nbakari']}, {term: '論ずる', source: '論ぜざる', rule: 'vz', reasons: ['-zaru']}, {term: '論ずる', source: '論ぜねば', rule: 'vz', reasons: ['-neba']},