From 23df75c400566bdf5657cc91b9eb060e665e6cd4 Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Fri, 6 Sep 2024 16:17:40 +0700 Subject: [PATCH 1/7] Add volitional slang --- .../japanese-language-transformer.bench.js | 6 ++ ext/js/language/ja/japanese-transforms.js | 76 +++++++++++++++++++ test/language/japanese-transforms.test.js | 30 ++++++++ 3 files changed, 112 insertions(+) diff --git a/benches/japanese-language-transformer.bench.js b/benches/japanese-language-transformer.bench.js index ce0910cbd1..4206805cf0 100644 --- a/benches/japanese-language-transformer.bench.js +++ b/benches/japanese-language-transformer.bench.js @@ -78,7 +78,9 @@ describe('japanese language transformer', () => { '食べぬ', '食べ', '食べましょう', + '食べましょっか', '食べよう', + '食べよっか', '食べるまい', '食べまい', '食べとく', @@ -145,7 +147,9 @@ describe('japanese language transformer', () => { 'こねば', 'き', 'きましょう', + 'きましょっか', 'こよう', + 'こよっか', 'くるまい', 'こまい', 'きとく', @@ -209,7 +213,9 @@ describe('japanese language transformer', () => { 'せざる', 'せねば', 'しましょう', + 'しましょっか', 'しよう', + 'しよっか', 'するまい', 'しまい', 'しとく', diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index 7479fd3b18..e68905aa85 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -544,6 +544,13 @@ export const japaneseTransforms = { suffixInflection('副うたら', '副う', [], ['v5']), suffixInflection('厭うたら', '厭う', [], ['v5']), suffixInflection('のたもうたら', 'のたまう', [], ['v5']), + suffixInflection('宣うたら', '宣う', [], ['v5']), + suffixInflection('曰うたら', '曰う', [], ['v5']), + suffixInflection('たもうたら', 'たまう', [], ['v5']), + suffixInflection('給うたら', '給う', [], ['v5']), + suffixInflection('賜うたら', '賜う', [], ['v5']), + suffixInflection('たゆとうたら', 'たゆたう', [], ['v5']), + suffixInflection('揺蕩うたら', '揺蕩う', [], ['v5']), suffixInflection('ましたら', 'ます', [], ['-masu']), ], }, @@ -595,6 +602,13 @@ export const japaneseTransforms = { suffixInflection('副うたり', '副う', [], ['v5']), suffixInflection('厭うたり', '厭う', [], ['v5']), suffixInflection('のたもうたり', 'のたまう', [], ['v5']), + suffixInflection('宣うたり', '宣う', [], ['v5']), + suffixInflection('曰うたり', '曰う', [], ['v5']), + suffixInflection('たもうたり', 'たまう', [], ['v5']), + suffixInflection('給うたり', '給う', [], ['v5']), + suffixInflection('賜うたり', '賜う', [], ['v5']), + suffixInflection('たゆとうたり', 'たゆたう', [], ['v5']), + suffixInflection('揺蕩うたり', '揺蕩う', [], ['v5']), ], }, '-te': { @@ -645,6 +659,13 @@ export const japaneseTransforms = { suffixInflection('副うて', '副う', ['-te'], ['v5']), suffixInflection('厭うて', '厭う', ['-te'], ['v5']), suffixInflection('のたもうて', 'のたまう', ['-te'], ['v5']), + suffixInflection('宣うて', '宣う', ['-te'], ['v5']), + suffixInflection('曰うて', '曰う', ['-te'], ['v5']), + suffixInflection('たもうて', 'たまう', ['-te'], ['v5']), + suffixInflection('給うて', '給う', ['-te'], ['v5']), + suffixInflection('賜うて', '賜う', ['-te'], ['v5']), + suffixInflection('たゆとうて', 'たゆたう', ['-te'], ['v5']), + suffixInflection('揺蕩うて', '揺蕩う', ['-te'], ['v5']), suffixInflection('まして', 'ます', [], ['-masu']), ], }, @@ -1198,6 +1219,13 @@ export const japaneseTransforms = { 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'], ['v5']), suffixInflection('ました', 'ます', ['past'], ['-masu']), suffixInflection('でした', '', ['past'], ['-masen']), suffixInflection('かった', '', ['past'], ['-masen', '-n']), @@ -1322,6 +1350,33 @@ export const japaneseTransforms = { suffixInflection('かろう', 'い', [], ['adj-i']), ], }, + 'volitional slang': { + name: 'volitional slang', + description: 'Contractive form of the volitional form + か\n' + + '1. Expresses speaker\'s will or intention; volitional form.\n' + + '2. Expresses an invitation to the other party.\n' + + 'Usage: Replace final う with っ of the volitional form then add か.\n' + + 'For example: 行こうか -> 行こっか.', + 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('ましょっか', 'ます', [], ['-masu']), + ], + }, '-mai': { name: '-mai', description: 'Negative volitional form of verbs.\n' + @@ -1634,6 +1689,27 @@ export const japaneseTransforms = { suffixInflection('ゆうたら', 'いったら', [], []), ], }, + 'kansai-ben -tari': { + name: 'kansai-ben', + description: '-tari form of kansai-ben terms', + rules: [ + suffixInflection('うたり', 'ったり', [], []), + suffixInflection('おうたり', 'あったり', [], []), + suffixInflection('こうたり', 'かったり', [], []), + suffixInflection('ごうたり', 'がったり', [], []), + suffixInflection('そうたり', 'さったり', [], []), + suffixInflection('ぞうたり', 'ざったり', [], []), + suffixInflection('とうたり', 'たったり', [], []), + suffixInflection('どうたり', 'だったり', [], []), + suffixInflection('のうたり', 'なったり', [], []), + suffixInflection('ほうたり', 'はったり', [], []), + suffixInflection('ぼうたり', 'ばったり', [], []), + suffixInflection('もうたり', 'まったり', [], []), + suffixInflection('ろうたり', 'らったり', [], []), + suffixInflection('ようたり', 'やったり', [], []), + suffixInflection('ゆうたり', 'いったり', [], []), + ], + }, 'kansai-ben -ku': { name: 'kansai-ben', description: '-ku stem of kansai-ben adjectives', diff --git a/test/language/japanese-transforms.test.js b/test/language/japanese-transforms.test.js index a506c4c1e4..428e0f4b9b 100644 --- a/test/language/japanese-transforms.test.js +++ b/test/language/japanese-transforms.test.js @@ -99,7 +99,9 @@ const tests = [ {term: '食べる', source: '食べにゃ', rule: 'v1', reasons: ['-neba', '-ya']}, {term: '食べる', source: '食べ', rule: 'v1d', reasons: ['continuative']}, {term: '食べる', source: '食べましょう', rule: 'v1', reasons: ['-masu', 'volitional']}, + {term: '食べる', source: '食べましょっか', rule: 'v1', reasons: ['-masu', 'volitional slang']}, {term: '食べる', source: '食べよう', rule: 'v1', reasons: ['volitional']}, + {term: '食べる', source: '食べよっか', rule: 'v1', reasons: ['volitional slang']}, {term: '食べる', source: '食べるまい', rule: 'v1', reasons: ['-mai']}, {term: '食べる', source: '食べまい', rule: 'v1', reasons: ['-mai']}, // ['causative-passive'] @@ -164,7 +166,9 @@ const tests = [ {term: '買う', source: '買わにゃ', rule: 'v5', reasons: ['-neba', '-ya']}, {term: '買う', source: '買い', rule: 'v5', reasons: ['continuative']}, {term: '買う', source: '買いましょう', rule: 'v5', reasons: ['-masu', 'volitional']}, + {term: '買う', source: '買いましょっか', rule: 'v5', reasons: ['-masu', 'volitional slang']}, {term: '買う', source: '買おう', rule: 'v5', reasons: ['volitional']}, + {term: '買う', source: '買おっか', rule: 'v5', reasons: ['volitional slang']}, {term: '買う', source: '買うまい', rule: 'v5', reasons: ['-mai']}, {term: '買う', source: '買わされる', rule: 'v5', reasons: ['causative-passive']}, {term: '買う', source: '買っとく', rule: 'v5', reasons: ['-toku']}, @@ -233,7 +237,9 @@ const tests = [ {term: '行く', source: '行かにゃ', rule: 'v5', reasons: ['-neba', '-ya']}, {term: '行く', source: '行き', rule: 'v5', reasons: ['continuative']}, {term: '行く', source: '行きましょう', rule: 'v5', reasons: ['-masu', 'volitional']}, + {term: '行く', source: '行きましょっか', rule: 'v5', reasons: ['-masu', 'volitional slang']}, {term: '行く', source: '行こう', rule: 'v5', reasons: ['volitional']}, + {term: '行く', source: '行こっか', rule: 'v5', reasons: ['volitional slang']}, {term: '行く', source: '行くまい', rule: 'v5', reasons: ['-mai']}, {term: '行く', source: '行かされる', rule: 'v5', reasons: ['causative-passive']}, {term: '行く', source: '行いとく', rule: 'v5', reasons: ['-toku']}, @@ -302,7 +308,9 @@ const tests = [ {term: '泳ぐ', source: '泳がにゃ', rule: 'v5', reasons: ['-neba', '-ya']}, {term: '泳ぐ', source: '泳ぎ', rule: 'v5', reasons: ['continuative']}, {term: '泳ぐ', source: '泳ぎましょう', rule: 'v5', reasons: ['-masu', 'volitional']}, + {term: '泳ぐ', source: '泳ぎましょっか', rule: 'v5', reasons: ['-masu', 'volitional slang']}, {term: '泳ぐ', source: '泳ごう', rule: 'v5', reasons: ['volitional']}, + {term: '泳ぐ', source: '泳ごっか', rule: 'v5', reasons: ['volitional slang']}, {term: '泳ぐ', source: '泳ぐまい', rule: 'v5', reasons: ['-mai']}, {term: '泳ぐ', source: '泳がされる', rule: 'v5', reasons: ['causative-passive']}, {term: '泳ぐ', source: '泳いどく', rule: 'v5', reasons: ['-toku']}, @@ -370,7 +378,9 @@ const tests = [ {term: '話す', source: '話さにゃ', rule: 'v5', reasons: ['-neba', '-ya']}, {term: '話す', source: '話し', rule: 'v5', reasons: ['continuative']}, {term: '話す', source: '話しましょう', rule: 'v5', reasons: ['-masu', 'volitional']}, + {term: '話す', source: '話しましょっか', rule: 'v5', reasons: ['-masu', 'volitional slang']}, {term: '話す', source: '話そう', rule: 'v5', reasons: ['volitional']}, + {term: '話す', source: '話そっか', rule: 'v5', reasons: ['volitional slang']}, {term: '話す', source: '話すまい', rule: 'v5', reasons: ['-mai']}, // ['causative-passive'] {term: '話す', source: '話しとく', rule: 'v5', reasons: ['-toku']}, @@ -444,7 +454,9 @@ const tests = [ {term: '待つ', source: '待たにゃ', rule: 'v5', reasons: ['-neba', '-ya']}, {term: '待つ', source: '待ち', rule: 'v5', reasons: ['continuative']}, {term: '待つ', source: '待ちましょう', rule: 'v5', reasons: ['-masu', 'volitional']}, + {term: '待つ', source: '待ちましょっか', rule: 'v5', reasons: ['-masu', 'volitional slang']}, {term: '待つ', source: '待とう', rule: 'v5', reasons: ['volitional']}, + {term: '待つ', source: '待とっか', rule: 'v5', reasons: ['volitional slang']}, {term: '待つ', source: '待つまい', rule: 'v5', reasons: ['-mai']}, {term: '待つ', source: '待たされる', rule: 'v5', reasons: ['causative-passive']}, {term: '待つ', source: '待っとく', rule: 'v5', reasons: ['-toku']}, @@ -513,7 +525,9 @@ const tests = [ {term: '死ぬ', source: '死なにゃ', rule: 'v5', reasons: ['-neba', '-ya']}, {term: '死ぬ', source: '死に', rule: 'v5', reasons: ['continuative']}, {term: '死ぬ', source: '死にましょう', rule: 'v5', reasons: ['-masu', 'volitional']}, + {term: '死ぬ', source: '死にましょっか', rule: 'v5', reasons: ['-masu', 'volitional slang']}, {term: '死ぬ', source: '死のう', rule: 'v5', reasons: ['volitional']}, + {term: '死ぬ', source: '死のっか', rule: 'v5', reasons: ['volitional slang']}, {term: '死ぬ', source: '死ぬまい', rule: 'v5', reasons: ['-mai']}, {term: '死ぬ', source: '死なされる', rule: 'v5', reasons: ['causative-passive']}, {term: '死ぬ', source: '死んどく', rule: 'v5', reasons: ['-toku']}, @@ -581,7 +595,9 @@ const tests = [ {term: '遊ぶ', source: '遊ばにゃ', rule: 'v5', reasons: ['-neba', '-ya']}, {term: '遊ぶ', source: '遊び', rule: 'v5', reasons: ['continuative']}, {term: '遊ぶ', source: '遊びましょう', rule: 'v5', reasons: ['-masu', 'volitional']}, + {term: '遊ぶ', source: '遊びましょっか', rule: 'v5', reasons: ['-masu', 'volitional slang']}, {term: '遊ぶ', source: '遊ぼう', rule: 'v5', reasons: ['volitional']}, + {term: '遊ぶ', source: '遊ぼっか', rule: 'v5', reasons: ['volitional slang']}, {term: '遊ぶ', source: '遊ぶまい', rule: 'v5', reasons: ['-mai']}, {term: '遊ぶ', source: '遊ばされる', rule: 'v5', reasons: ['causative-passive']}, {term: '遊ぶ', source: '遊んどく', rule: 'v5', reasons: ['-toku']}, @@ -649,7 +665,9 @@ const tests = [ {term: '飲む', source: '飲まにゃ', rule: 'v5', reasons: ['-neba', '-ya']}, {term: '飲む', source: '飲み', rule: 'v5', reasons: ['continuative']}, {term: '飲む', source: '飲みましょう', rule: 'v5', reasons: ['-masu', 'volitional']}, + {term: '飲む', source: '飲みましょっか', rule: 'v5', reasons: ['-masu', 'volitional slang']}, {term: '飲む', source: '飲もう', rule: 'v5', reasons: ['volitional']}, + {term: '飲む', source: '飲もっか', rule: 'v5', reasons: ['volitional slang']}, {term: '飲む', source: '飲むまい', rule: 'v5', reasons: ['-mai']}, {term: '飲む', source: '飲まされる', rule: 'v5', reasons: ['causative-passive']}, {term: '飲む', source: '飲んどく', rule: 'v5', reasons: ['-toku']}, @@ -715,7 +733,9 @@ const tests = [ {term: '作る', source: '作らにゃ', rule: 'v5', reasons: ['-neba', '-ya']}, {term: '作る', source: '作り', rule: 'v5', reasons: ['continuative']}, {term: '作る', source: '作りましょう', rule: 'v5', reasons: ['-masu', 'volitional']}, + {term: '作る', source: '作りましょっか', rule: 'v5', reasons: ['-masu', 'volitional slang']}, {term: '作る', source: '作ろう', rule: 'v5', reasons: ['volitional']}, + {term: '作る', source: '作ろっか', rule: 'v5', reasons: ['volitional slang']}, {term: '作る', source: '作るまい', rule: 'v5', reasons: ['-mai']}, {term: '作る', source: '作らされる', rule: 'v5', reasons: ['causative-passive']}, {term: '作る', source: '作っとく', rule: 'v5', reasons: ['-toku']}, @@ -788,7 +808,9 @@ const tests = [ {term: '為る', source: '為にゃ', rule: 'vs', reasons: ['-neba', '-ya']}, // ['continuative'] {term: '為る', source: '為ましょう', rule: 'vs', reasons: ['-masu', 'volitional']}, + {term: '為る', source: '為ましょっか', rule: 'vs', reasons: ['-masu', 'volitional slang']}, {term: '為る', source: '為よう', rule: 'vs', reasons: ['volitional']}, + {term: '為る', source: '為よっか', rule: 'vs', reasons: ['volitional slang']}, {term: '為る', source: '為るまい', rule: 'vs', reasons: ['-mai']}, {term: '為る', source: '為まい', rule: 'vs', reasons: ['-mai']}, // ['causative-passive'] @@ -859,7 +881,9 @@ const tests = [ {term: 'する', source: 'せにゃ', rule: 'vs', reasons: ['-neba', '-ya']}, {term: 'する', source: 'し', rule: 'vs', reasons: ['continuative']}, {term: 'する', source: 'しましょう', rule: 'vs', reasons: ['-masu', 'volitional']}, + {term: 'する', source: 'しましょっか', rule: 'vs', reasons: ['-masu', 'volitional slang']}, {term: 'する', source: 'しよう', rule: 'vs', reasons: ['volitional']}, + {term: 'する', source: 'しよっか', rule: 'vs', reasons: ['volitional slang']}, {term: 'する', source: 'するまい', rule: 'vs', reasons: ['-mai']}, {term: 'する', source: 'しまい', rule: 'vs', reasons: ['-mai']}, {term: 'する', source: 'しなきゃ', rule: 'vs', reasons: ['negative', '-ba', '-ya']}, @@ -925,7 +949,9 @@ const tests = [ {term: '来る', source: '来にゃ', rule: 'vk', reasons: ['-neba', '-ya']}, {term: '来る', source: '来', rule: 'vk', reasons: ['continuative']}, {term: '来る', source: '来ましょう', rule: 'vk', reasons: ['-masu', 'volitional']}, + {term: '来る', source: '来ましょっか', rule: 'vk', reasons: ['-masu', 'volitional slang']}, {term: '来る', source: '来よう', rule: 'vk', reasons: ['volitional']}, + {term: '来る', source: '来よっか', rule: 'vk', reasons: ['volitional slang']}, {term: '来る', source: '来るまい', rule: 'vk', reasons: ['-mai']}, {term: '来る', source: '来まい', rule: 'vk', reasons: ['-mai']}, // ['causative-passive'] @@ -990,7 +1016,9 @@ const tests = [ {term: '來る', source: '來にゃ', rule: 'vk', reasons: ['-neba', '-ya']}, {term: '來る', source: '來', rule: 'vk', reasons: ['continuative']}, {term: '來る', source: '來ましょう', rule: 'vk', reasons: ['-masu', 'volitional']}, + {term: '來る', source: '來ましょっか', rule: 'vk', reasons: ['-masu', 'volitional slang']}, {term: '來る', source: '來よう', rule: 'vk', reasons: ['volitional']}, + {term: '來る', source: '來よっか', rule: 'vk', reasons: ['volitional slang']}, {term: '來る', source: '來るまい', rule: 'vk', reasons: ['-mai']}, {term: '來る', source: '來まい', rule: 'vk', reasons: ['-mai']}, // ['causative-passive'] @@ -1055,7 +1083,9 @@ const tests = [ {term: 'くる', source: 'こにゃ', rule: 'vk', reasons: ['-neba', '-ya']}, {term: 'くる', source: 'き', rule: 'vk', reasons: ['continuative']}, {term: 'くる', source: 'きましょう', rule: 'vk', reasons: ['-masu', 'volitional']}, + {term: 'くる', source: 'きましょっか', rule: 'vk', reasons: ['-masu', 'volitional slang']}, {term: 'くる', source: 'こよう', rule: 'vk', reasons: ['volitional']}, + {term: 'くる', source: 'こよっか', rule: 'vk', reasons: ['volitional slang']}, {term: 'くる', source: 'くるまい', rule: 'vk', reasons: ['-mai']}, {term: 'くる', source: 'こまい', rule: 'vk', reasons: ['-mai']}, // ['causative-passive'] From 48d6ab93580f6b4133a2f0abcbab94e367a12321 Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Fri, 6 Sep 2024 16:18:27 +0700 Subject: [PATCH 2/7] typo --- 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 e68905aa85..4684030d73 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -1363,7 +1363,7 @@ export const japaneseTransforms = { suffixInflection('こっか', 'く', [], ['v5']), suffixInflection('ごっか', 'ぐ', [], ['v5']), suffixInflection('そっか', 'す', [], ['v5']), - suffixInflection('とうか', 'つ', [], ['v5']), + suffixInflection('とっか', 'つ', [], ['v5']), suffixInflection('のっか', 'ぬ', [], ['v5']), suffixInflection('ぼっか', 'ぶ', [], ['v5']), suffixInflection('もっか', 'む', [], ['v5']), From a83c3aab43d299aa84857ea76629fbdcd8dcd8c9 Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Fri, 6 Sep 2024 16:21:16 +0700 Subject: [PATCH 3/7] update description --- ext/js/language/ja/japanese-transforms.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index 4684030d73..7d9bc4be8d 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -1315,7 +1315,7 @@ export const japaneseTransforms = { }, 'volitional': { name: 'volitional', - description: '1. Expresses speaker\'s will or intention; volitional form.\n' + + description: '1. Expresses speaker\'s will or intention.\n' + '2. Expresses an invitation to the other party.\n' + '3. (Used in …ようとする) Indicates being on the verge of initiating an action or transforming a state.\n' + '4. Indicates an inference of a matter.\n' + @@ -1353,7 +1353,7 @@ export const japaneseTransforms = { 'volitional slang': { name: 'volitional slang', description: 'Contractive form of the volitional form + か\n' + - '1. Expresses speaker\'s will or intention; volitional form.\n' + + '1. Expresses speaker\'s will or intention.\n' + '2. Expresses an invitation to the other party.\n' + 'Usage: Replace final う with っ of the volitional form then add か.\n' + 'For example: 行こうか -> 行こっか.', From aeb1610c7d27e451605d838dbefa3bd41424e89e Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Fri, 6 Sep 2024 16:33:53 +0700 Subject: [PATCH 4/7] remove code from wrong branch --- ext/js/language/ja/japanese-transforms.js | 32 ----------------------- 1 file changed, 32 deletions(-) diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index 7d9bc4be8d..0285c0cef2 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -543,14 +543,6 @@ export const japaneseTransforms = { suffixInflection('添うたら', '添う', [], ['v5']), suffixInflection('副うたら', '副う', [], ['v5']), suffixInflection('厭うたら', '厭う', [], ['v5']), - suffixInflection('のたもうたら', 'のたまう', [], ['v5']), - suffixInflection('宣うたら', '宣う', [], ['v5']), - suffixInflection('曰うたら', '曰う', [], ['v5']), - suffixInflection('たもうたら', 'たまう', [], ['v5']), - suffixInflection('給うたら', '給う', [], ['v5']), - suffixInflection('賜うたら', '賜う', [], ['v5']), - suffixInflection('たゆとうたら', 'たゆたう', [], ['v5']), - suffixInflection('揺蕩うたら', '揺蕩う', [], ['v5']), suffixInflection('ましたら', 'ます', [], ['-masu']), ], }, @@ -601,14 +593,6 @@ export const japaneseTransforms = { suffixInflection('添うたり', '添う', [], ['v5']), suffixInflection('副うたり', '副う', [], ['v5']), suffixInflection('厭うたり', '厭う', [], ['v5']), - suffixInflection('のたもうたり', 'のたまう', [], ['v5']), - suffixInflection('宣うたり', '宣う', [], ['v5']), - suffixInflection('曰うたり', '曰う', [], ['v5']), - suffixInflection('たもうたり', 'たまう', [], ['v5']), - suffixInflection('給うたり', '給う', [], ['v5']), - suffixInflection('賜うたり', '賜う', [], ['v5']), - suffixInflection('たゆとうたり', 'たゆたう', [], ['v5']), - suffixInflection('揺蕩うたり', '揺蕩う', [], ['v5']), ], }, '-te': { @@ -658,14 +642,6 @@ export const japaneseTransforms = { suffixInflection('添うて', '添う', ['-te'], ['v5']), suffixInflection('副うて', '副う', ['-te'], ['v5']), suffixInflection('厭うて', '厭う', ['-te'], ['v5']), - suffixInflection('のたもうて', 'のたまう', ['-te'], ['v5']), - suffixInflection('宣うて', '宣う', ['-te'], ['v5']), - suffixInflection('曰うて', '曰う', ['-te'], ['v5']), - suffixInflection('たもうて', 'たまう', ['-te'], ['v5']), - suffixInflection('給うて', '給う', ['-te'], ['v5']), - suffixInflection('賜うて', '賜う', ['-te'], ['v5']), - suffixInflection('たゆとうて', 'たゆたう', ['-te'], ['v5']), - suffixInflection('揺蕩うて', '揺蕩う', ['-te'], ['v5']), suffixInflection('まして', 'ます', [], ['-masu']), ], }, @@ -1218,14 +1194,6 @@ export const japaneseTransforms = { 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'], ['v5']), - suffixInflection('揺蕩うた', '揺蕩う', ['past'], ['v5']), suffixInflection('ました', 'ます', ['past'], ['-masu']), suffixInflection('でした', '', ['past'], ['-masen']), suffixInflection('かった', '', ['past'], ['-masen', '-n']), From 877332efad6cf2b66c33e8e76df23020f4f5bdc7 Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Fri, 6 Sep 2024 16:57:48 +0700 Subject: [PATCH 5/7] clean up --- ext/js/language/ja/japanese-transforms.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index 0285c0cef2..5ef1227185 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -543,6 +543,7 @@ export const japaneseTransforms = { suffixInflection('添うたら', '添う', [], ['v5']), suffixInflection('副うたら', '副う', [], ['v5']), suffixInflection('厭うたら', '厭う', [], ['v5']), + suffixInflection('のたもうたら', 'のたまう', [], ['v5']), suffixInflection('ましたら', 'ます', [], ['-masu']), ], }, @@ -593,6 +594,7 @@ export const japaneseTransforms = { suffixInflection('添うたり', '添う', [], ['v5']), suffixInflection('副うたり', '副う', [], ['v5']), suffixInflection('厭うたり', '厭う', [], ['v5']), + suffixInflection('のたもうたり', 'のたまう', [], ['v5']), ], }, '-te': { @@ -642,6 +644,7 @@ export const japaneseTransforms = { suffixInflection('添うて', '添う', ['-te'], ['v5']), suffixInflection('副うて', '副う', ['-te'], ['v5']), suffixInflection('厭うて', '厭う', ['-te'], ['v5']), + suffixInflection('のたもうて', 'のたまう', ['-te'], ['v5']), suffixInflection('まして', 'ます', [], ['-masu']), ], }, @@ -1194,6 +1197,7 @@ export const japaneseTransforms = { suffixInflection('添うた', '添う', ['past'], ['v5']), suffixInflection('副うた', '副う', ['past'], ['v5']), suffixInflection('厭うた', '厭う', ['past'], ['v5']), + suffixInflection('のたもうた', 'のたまう', ['past'], ['v5']), suffixInflection('ました', 'ます', ['past'], ['-masu']), suffixInflection('でした', '', ['past'], ['-masen']), suffixInflection('かった', '', ['past'], ['-masen', '-n']), @@ -1320,7 +1324,7 @@ export const japaneseTransforms = { }, 'volitional slang': { name: 'volitional slang', - description: 'Contractive form of the volitional form + か\n' + + description: 'Contraction of the volitional form + か\n' + '1. Expresses speaker\'s will or intention.\n' + '2. Expresses an invitation to the other party.\n' + 'Usage: Replace final う with っ of the volitional form then add か.\n' + From dfd857de2916134b5b69bc4980c70b7d147483c7 Mon Sep 17 00:00:00 2001 From: Khai Truong <56820749+khaitruong922@users.noreply.github.com> Date: Fri, 6 Sep 2024 17:16:48 +0700 Subject: [PATCH 6/7] Apply suggestions from code review Signed-off-by: Khai Truong <56820749+khaitruong922@users.noreply.github.com> --- ext/js/language/ja/japanese-transforms.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index 5ef1227185..15a8ae27fa 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -1324,10 +1324,10 @@ export const japaneseTransforms = { }, 'volitional slang': { name: 'volitional slang', - description: 'Contraction of the volitional form + か\n' + + description: 'Contraction of volitional form + か\n' + '1. Expresses speaker\'s will or intention.\n' + '2. Expresses an invitation to the other party.\n' + - 'Usage: Replace final う with っ of the volitional form then add か.\n' + + 'Usage: Replace final う with っ of volitional form then add か.\n' + 'For example: 行こうか -> 行こっか.', rules: [ suffixInflection('よっか', 'る', [], ['v1']), From d9ca9810f874f687f095854ffad44ddc168fc021 Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Fri, 6 Sep 2024 17:17:36 +0700 Subject: [PATCH 7/7] remove code from wrong branch --- ext/js/language/ja/japanese-transforms.js | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index 15a8ae27fa..7e4338c479 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -1661,27 +1661,6 @@ export const japaneseTransforms = { suffixInflection('ゆうたら', 'いったら', [], []), ], }, - 'kansai-ben -tari': { - name: 'kansai-ben', - description: '-tari form of kansai-ben terms', - rules: [ - suffixInflection('うたり', 'ったり', [], []), - suffixInflection('おうたり', 'あったり', [], []), - suffixInflection('こうたり', 'かったり', [], []), - suffixInflection('ごうたり', 'がったり', [], []), - suffixInflection('そうたり', 'さったり', [], []), - suffixInflection('ぞうたり', 'ざったり', [], []), - suffixInflection('とうたり', 'たったり', [], []), - suffixInflection('どうたり', 'だったり', [], []), - suffixInflection('のうたり', 'なったり', [], []), - suffixInflection('ほうたり', 'はったり', [], []), - suffixInflection('ぼうたり', 'ばったり', [], []), - suffixInflection('もうたり', 'まったり', [], []), - suffixInflection('ろうたり', 'らったり', [], []), - suffixInflection('ようたり', 'やったり', [], []), - suffixInflection('ゆうたり', 'いったり', [], []), - ], - }, 'kansai-ben -ku': { name: 'kansai-ben', description: '-ku stem of kansai-ben adjectives',