diff options
author | StefanVukovic99 <stefanvukovic44@gmail.com> | 2024-01-27 09:59:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-27 08:59:39 +0000 |
commit | a3224f688f44c9c913f32add1223e922ce88e65a (patch) | |
tree | b23432bdfb87418766b6872662749cb85418ffdf /ext/js/language/deinflector.js | |
parent | 6ba1ffe74558dd174e3308d48885fb068fa37d55 (diff) |
fix deinflection bug (#547)
* fix deinflection bug
* add test
Diffstat (limited to 'ext/js/language/deinflector.js')
-rw-r--r-- | ext/js/language/deinflector.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ext/js/language/deinflector.js b/ext/js/language/deinflector.js index 7d75576d..b52b7f5b 100644 --- a/ext/js/language/deinflector.js +++ b/ext/js/language/deinflector.js @@ -20,13 +20,15 @@ export class Deinflector { /* eslint-disable no-multi-spaces */ /** @type {Map<string, import('translation-internal').DeinflectionRuleFlags>} @readonly */ static _ruleTypes = new Map([ - ['v1', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00000001)], // Verb ichidan - ['v5', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00000010)], // Verb godan - ['vs', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00000100)], // Verb suru - ['vk', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00001000)], // Verb kuru - ['vz', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00010000)], // Verb zuru - ['adj-i', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b00100000)], // Adjective i - ['iru', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b01000000)] // Intermediate -iru endings for progressive or perfect tense + ['v1', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b000000011)], // Verb ichidan + ['v1d', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b000000010)], // Verb ichidan dictionary form + ['v1p', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b000000001)], // Verb ichidan progressive or perfect + ['v5', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b000000100)], // Verb godan + ['vs', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b000001000)], // Verb suru + ['vk', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b000010000)], // Verb kuru + ['vz', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b000100000)], // Verb zuru + ['adj-i', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b001000000)], // Adjective i + ['iru', /** @type {import('translation-internal').DeinflectionRuleFlags} */ (0b010000000)] // Intermediate -iru endings for progressive or perfect tense ]); /* eslint-enable no-multi-spaces */ |