Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ja] Add volitional slang #1396

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions benches/japanese-language-transformer.bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ describe('japanese language transformer', () => {
'食べぬ',
'食べ',
'食べましょう',
'食べましょっか',
'食べよう',
'食べよっか',
'食べるまい',
'食べまい',
'食べとく',
Expand Down Expand Up @@ -145,7 +147,9 @@ describe('japanese language transformer', () => {
'こねば',
'き',
'きましょう',
'きましょっか',
'こよう',
'こよっか',
'くるまい',
'こまい',
'きとく',
Expand Down Expand Up @@ -209,7 +213,9 @@ describe('japanese language transformer', () => {
'せざる',
'せねば',
'しましょう',
'しましょっか',
'しよう',
'しよっか',
'するまい',
'しまい',
'しとく',
Expand Down
81 changes: 80 additions & 1 deletion ext/js/language/ja/japanese-transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
],
},
Expand Down Expand Up @@ -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': {
Expand Down Expand Up @@ -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']),
],
},
Expand Down Expand Up @@ -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']),
Expand Down Expand Up @@ -1293,7 +1321,9 @@ export const japaneseTransforms = {
'4. Indicates an inference of a matter.\n' +
'Usage: Attach よう to the irrealis form (mizenkei) of ichidan verbs.\n' +
'Attach う to the irrealis form (mizenkei) of godan verbs after -o euphonic change form.\n' +
'Attach かろう to the stem of i-adjectives (4th meaning only).',
'Attach かろう to the stem of i-adjectives (4th meaning only).\n' +
'(Slang) Volitional form + か, can be contracted be replacing the う with っ.\n' +
'For example, 行こうか can be contracted to 行こっか.',
i18n: [
{
language: 'ja',
Expand All @@ -1319,9 +1349,37 @@ export const japaneseTransforms = {
suffixInflection('来よう', '来る', [], ['vk']),
suffixInflection('來よう', '來る', [], ['vk']),
suffixInflection('ましょう', 'ます', [], ['-masu']),

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' +
Expand Down Expand Up @@ -1634,6 +1692,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',
Expand Down
Loading
Loading