Skip to content

Commit

Permalink
feat: add irregular ta/te-stem for tamau/tamou
Browse files Browse the repository at this point in the history
Fixes #1470.
  • Loading branch information
enellis authored and birtles committed Jun 14, 2024
1 parent c306edd commit 3375ace
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ app.

## [Unreleased]

- Added support for irregular verb forms of 給う
([#1470](https://github.com/birchill/10ten-ja-reader/issues/1470)).
- Fixed recognition of continuous forms of verbs with irregular te form.
([#1811](https://github.com/birchill/10ten-ja-reader/pull/1811)).

Expand Down
8 changes: 8 additions & 0 deletions src/background/deinflect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ describe('deinflect', () => {
['厭うた', '厭う'],
['いとうた', 'いとう'],
['のたもうた', 'のたまう'],
['たまうた', 'たまう'],
['たもうた', 'たもう'],
['給うた', '給う'],
['賜うた', '賜う'],
];

for (const [inflected, plain] of cases) {
Expand Down Expand Up @@ -197,6 +201,10 @@ describe('deinflect', () => {
['厭うていて', '厭う', [Reason.Continuous, Reason.Te]],
['いとうていて', 'いとう', [Reason.Continuous, Reason.Te]],
['のたもうてて', 'のたまう', [Reason.Continuous, Reason.Te]],
['たまうている', 'たまう', [Reason.Continuous]],
['たもうていた', 'たもう', [Reason.Continuous, Reason.Past]],
['給うてた', '給う', [Reason.Continuous, Reason.Past]],
['賜うてて', '賜う', [Reason.Continuous, Reason.Te]],
];

for (const [inflected, plain, reasons] of cases) {
Expand Down
4 changes: 4 additions & 0 deletions src/background/deinflect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ const deinflectRuleData: Array<
['すぎる', '', Type.IchidanVerb, Type.MasuStem, Reason.Sugiru],
['たせる', 'つ', Type.IchidanVerb, Type.GodanVerb, Reason.Causative],
['たない', 'つ', Type.IAdj | Type.VNai, Type.GodanVerb, Reason.Negative],
['たまう', 'たまう', Type.TaTeStem, Type.GodanVerb, Reason.None],
['たもう', 'たもう', Type.TaTeStem, Type.GodanVerb, Reason.None],
['たれる', 'つ', Type.IchidanVerb, Type.GodanVerb, Reason.Passive],
['ちゃう', 'る', Type.GodanVerb, Type.IchidanVerb | Type.KuruVerb, Reason.Chau],
['ちゃう', '', Type.GodanVerb, Type.TaTeStem, Reason.Chau],
Expand Down Expand Up @@ -344,6 +346,8 @@ const deinflectRuleData: Array<
['添う', '添う', Type.TaTeStem, Type.GodanVerb, Reason.None],
['副う', '副う', Type.TaTeStem, Type.GodanVerb, Reason.None],
['厭う', '厭う', Type.TaTeStem, Type.GodanVerb, Reason.None],
['給う', '給う', Type.TaTeStem, Type.GodanVerb, Reason.None],
['賜う', '賜う', Type.TaTeStem, Type.GodanVerb, Reason.None],
// -------------- 1 --------------
['い', 'いる', Type.Initial, Type.IchidanVerb, Reason.MasuStem],
['い', 'う', Type.MasuStem, Type.GodanVerb, Reason.MasuStem],
Expand Down

0 comments on commit 3375ace

Please sign in to comment.