diff --git a/lib/util/lemmatizer/rules/godan_verbs.dart b/lib/util/lemmatizer/rules/godan_verbs.dart index aecb760..e7c1365 100644 --- a/lib/util/lemmatizer/rules/godan_verbs.dart +++ b/lib/util/lemmatizer/rules/godan_verbs.dart @@ -1,457 +1,509 @@ import 'package:jadb/util/lemmatizer/lemmatizer.dart'; -List godanVerbLemmatizationRules = [ - LemmatizationRule( - name: 'Godan verb - base form', - terminal: true, - pattern: AllomorphPattern( - patterns: { - 'う': ['う'], - 'く': ['く'], - 'ぐ': ['ぐ'], - 'す': ['す'], - 'つ': ['つ'], - 'ぬ': ['ぬ'], - 'ぶ': ['ぶ'], - 'む': ['む'], - 'る': ['る'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, +final LemmatizationRule godanVerbBase = LemmatizationRule( + name: 'Godan verb - base form', + terminal: true, + pattern: AllomorphPattern( + patterns: { + 'う': ['う'], + 'く': ['く'], + 'ぐ': ['ぐ'], + 'す': ['す'], + 'つ': ['つ'], + 'ぬ': ['ぬ'], + 'ぶ': ['ぶ'], + 'む': ['む'], + 'る': ['る'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative form', - pattern: AllomorphPattern( - patterns: { - 'わない': ['う'], - 'かない': ['く'], - 'がない': ['ぐ'], - 'さない': ['す'], - 'たない': ['つ'], - 'なない': ['ぬ'], - 'ばない': ['ぶ'], - 'まない': ['む'], - 'らない': ['る'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegative = LemmatizationRule( + name: 'Godan verb - negative form', + pattern: AllomorphPattern( + patterns: { + 'わない': ['う'], + 'かない': ['く'], + 'がない': ['ぐ'], + 'さない': ['す'], + 'たない': ['つ'], + 'なない': ['ぬ'], + 'ばない': ['ぶ'], + 'まない': ['む'], + 'らない': ['る'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - past form', - pattern: AllomorphPattern( - patterns: { - 'した': ['す'], - 'った': ['る', 'つ', 'う'], - 'んだ': ['む', 'ぬ', 'ぶ'], - 'いだ': ['ぐ'], - 'いた': ['く'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbPast = LemmatizationRule( + name: 'Godan verb - past form', + pattern: AllomorphPattern( + patterns: { + 'した': ['す'], + 'った': ['る', 'つ', 'う'], + 'んだ': ['む', 'ぬ', 'ぶ'], + 'いだ': ['ぐ'], + 'いた': ['く'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - te-form', - pattern: AllomorphPattern( - patterns: { - 'いて': ['く', 'ぐ'], - 'して': ['す'], - 'って': ['る', 'つ', 'う'], - 'んで': ['む', 'ぬ', 'ぶ'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbTe = LemmatizationRule( + name: 'Godan verb - te-form', + pattern: AllomorphPattern( + patterns: { + 'いて': ['く', 'ぐ'], + 'して': ['す'], + 'って': ['る', 'つ', 'う'], + 'んで': ['む', 'ぬ', 'ぶ'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - te-form with いる', - pattern: AllomorphPattern( - patterns: { - 'いている': ['く', 'ぐ'], - 'している': ['す'], - 'っている': ['る', 'つ', 'う'], - 'んでいる': ['む', 'ぬ', 'ぶ'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbTeiru = LemmatizationRule( + name: 'Godan verb - te-form with いる', + pattern: AllomorphPattern( + patterns: { + 'いている': ['く', 'ぐ'], + 'している': ['す'], + 'っている': ['る', 'つ', 'う'], + 'んでいる': ['む', 'ぬ', 'ぶ'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - te-form with いた', - pattern: AllomorphPattern( - patterns: { - 'いていた': ['く', 'ぐ'], - 'していた': ['す'], - 'っていた': ['る', 'つ', 'う'], - 'んでいた': ['む', 'ぬ', 'ぶ'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbTeita = LemmatizationRule( + name: 'Godan verb - te-form with いた', + pattern: AllomorphPattern( + patterns: { + 'いていた': ['く', 'ぐ'], + 'していた': ['す'], + 'っていた': ['る', 'つ', 'う'], + 'んでいた': ['む', 'ぬ', 'ぶ'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - conditional form', - pattern: AllomorphPattern( - patterns: { - 'けば': ['く'], - 'げば': ['ぐ'], - 'せば': ['す'], - 'てば': ['つ', 'る', 'う'], - 'ねば': ['ぬ'], - 'べば': ['ぶ'], - 'めば': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbConditional = LemmatizationRule( + name: 'Godan verb - conditional form', + pattern: AllomorphPattern( + patterns: { + 'けば': ['く'], + 'げば': ['ぐ'], + 'せば': ['す'], + 'てば': ['つ', 'る', 'う'], + 'ねば': ['ぬ'], + 'べば': ['ぶ'], + 'めば': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - volitional form', - pattern: AllomorphPattern( - patterns: { - 'おう': ['う'], - 'こう': ['く'], - 'ごう': ['ぐ'], - 'そう': ['す'], - 'とう': ['つ', 'る', 'う'], - 'のう': ['ぬ'], - 'ぼう': ['ぶ'], - 'もう': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbVolitional = LemmatizationRule( + name: 'Godan verb - volitional form', + pattern: AllomorphPattern( + patterns: { + 'おう': ['う'], + 'こう': ['く'], + 'ごう': ['ぐ'], + 'そう': ['す'], + 'とう': ['つ', 'る', 'う'], + 'のう': ['ぬ'], + 'ぼう': ['ぶ'], + 'もう': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - potential form', - pattern: AllomorphPattern( - patterns: { - 'ける': ['く'], - 'げる': ['ぐ'], - 'せる': ['す'], - 'てる': ['つ', 'る', 'う'], - 'ねる': ['ぬ'], - 'べる': ['ぶ'], - 'める': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbPotential = LemmatizationRule( + name: 'Godan verb - potential form', + pattern: AllomorphPattern( + patterns: { + 'ける': ['く'], + 'げる': ['ぐ'], + 'せる': ['す'], + 'てる': ['つ', 'る', 'う'], + 'ねる': ['ぬ'], + 'べる': ['ぶ'], + 'める': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - passive form', - pattern: AllomorphPattern( - patterns: { - 'かれる': ['く'], - 'がれる': ['ぐ'], - 'される': ['す'], - 'たれる': ['つ', 'る', 'う'], - 'なれる': ['ぬ'], - 'ばれる': ['ぶ'], - 'まれる': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbPassive = LemmatizationRule( + name: 'Godan verb - passive form', + pattern: AllomorphPattern( + patterns: { + 'かれる': ['く'], + 'がれる': ['ぐ'], + 'される': ['す'], + 'たれる': ['つ', 'る', 'う'], + 'なれる': ['ぬ'], + 'ばれる': ['ぶ'], + 'まれる': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - causative form', - pattern: AllomorphPattern( - patterns: { - 'かせる': ['く'], - 'がせる': ['ぐ'], - 'させる': ['す'], - 'たせる': ['つ', 'る', 'う'], - 'なせる': ['ぬ'], - 'ばせる': ['ぶ'], - 'ませる': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbCausative = LemmatizationRule( + name: 'Godan verb - causative form', + pattern: AllomorphPattern( + patterns: { + 'かせる': ['く'], + 'がせる': ['ぐ'], + 'させる': ['す'], + 'たせる': ['つ', 'る', 'う'], + 'なせる': ['ぬ'], + 'ばせる': ['ぶ'], + 'ませる': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - causative-passive form', - pattern: AllomorphPattern( - patterns: { - 'かされる': ['く'], - 'がされる': ['ぐ'], - 'される': ['す'], - 'たされる': ['つ', 'る', 'う'], - 'なされる': ['ぬ'], - 'ばされる': ['ぶ'], - 'まされる': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbCausativePassive = LemmatizationRule( + name: 'Godan verb - causative-passive form', + pattern: AllomorphPattern( + patterns: { + 'かされる': ['く'], + 'がされる': ['ぐ'], + 'される': ['す'], + 'たされる': ['つ', 'る', 'う'], + 'なされる': ['ぬ'], + 'ばされる': ['ぶ'], + 'まされる': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - imperative form', - pattern: AllomorphPattern( - patterns: { - 'え': ['う'], - 'け': ['く'], - 'げ': ['ぐ'], - 'せ': ['す'], - 'て': ['つ', 'る', 'う'], - 'ね': ['ぬ'], - 'べ': ['ぶ'], - 'め': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbImperative = LemmatizationRule( + name: 'Godan verb - imperative form', + pattern: AllomorphPattern( + patterns: { + 'え': ['う'], + 'け': ['く'], + 'げ': ['ぐ'], + 'せ': ['す'], + 'て': ['つ', 'る', 'う'], + 'ね': ['ぬ'], + 'べ': ['ぶ'], + 'め': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative past form', - pattern: AllomorphPattern( - patterns: { - 'わなかった': ['う'], - 'かなかった': ['く'], - 'がなかった': ['ぐ'], - 'さなかった': ['す'], - 'たなかった': ['つ'], - 'ななかった': ['ぬ'], - 'ばなかった': ['ぶ'], - 'まなかった': ['む'], - 'らなかった': ['る'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegativePast = LemmatizationRule( + name: 'Godan verb - negative past form', + pattern: AllomorphPattern( + patterns: { + 'わなかった': ['う'], + 'かなかった': ['く'], + 'がなかった': ['ぐ'], + 'さなかった': ['す'], + 'たなかった': ['つ'], + 'ななかった': ['ぬ'], + 'ばなかった': ['ぶ'], + 'まなかった': ['む'], + 'らなかった': ['る'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative te-form', - pattern: AllomorphPattern( - patterns: { - 'わなくて': ['う'], - 'かなくて': ['く'], - 'がなくて': ['ぐ'], - 'さなくて': ['す'], - 'たなくて': ['つ'], - 'ななくて': ['ぬ'], - 'ばなくて': ['ぶ'], - 'まなくて': ['む'], - 'らなくて': ['る'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegativeTe = LemmatizationRule( + name: 'Godan verb - negative te-form', + pattern: AllomorphPattern( + patterns: { + 'わなくて': ['う'], + 'かなくて': ['く'], + 'がなくて': ['ぐ'], + 'さなくて': ['す'], + 'たなくて': ['つ'], + 'ななくて': ['ぬ'], + 'ばなくて': ['ぶ'], + 'まなくて': ['む'], + 'らなくて': ['る'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative conditional form', - pattern: AllomorphPattern( - patterns: { - 'わなければ': ['う'], - 'かなければ': ['く'], - 'がなければ': ['ぐ'], - 'さなければ': ['す'], - 'たなければ': ['つ'], - 'ななければ': ['ぬ'], - 'ばなければ': ['ぶ'], - 'まなければ': ['む'], - 'らなければ': ['る'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegativeConditional = LemmatizationRule( + name: 'Godan verb - negative conditional form', + pattern: AllomorphPattern( + patterns: { + 'わなければ': ['う'], + 'かなければ': ['く'], + 'がなければ': ['ぐ'], + 'さなければ': ['す'], + 'たなければ': ['つ'], + 'ななければ': ['ぬ'], + 'ばなければ': ['ぶ'], + 'まなければ': ['む'], + 'らなければ': ['る'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative volitional form', - pattern: AllomorphPattern( - patterns: { - 'うまい': ['う'], - 'くまい': ['く'], - 'ぐまい': ['ぐ'], - 'すまい': ['す'], - 'つまい': ['つ', 'る', 'う'], - 'ぬまい': ['ぬ'], - 'ぶまい': ['ぶ'], - 'むまい': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegativeVolitional = LemmatizationRule( + name: 'Godan verb - negative volitional form', + pattern: AllomorphPattern( + patterns: { + 'うまい': ['う'], + 'くまい': ['く'], + 'ぐまい': ['ぐ'], + 'すまい': ['す'], + 'つまい': ['つ', 'る', 'う'], + 'ぬまい': ['ぬ'], + 'ぶまい': ['ぶ'], + 'むまい': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative potential form', - pattern: AllomorphPattern( - patterns: { - 'けない': ['く'], - 'げない': ['ぐ'], - 'せない': ['す'], - 'てない': ['つ', 'る', 'う'], - 'ねない': ['ぬ'], - 'べない': ['ぶ'], - 'めない': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegativePotential = LemmatizationRule( + name: 'Godan verb - negative potential form', + pattern: AllomorphPattern( + patterns: { + 'けない': ['く'], + 'げない': ['ぐ'], + 'せない': ['す'], + 'てない': ['つ', 'る', 'う'], + 'ねない': ['ぬ'], + 'べない': ['ぶ'], + 'めない': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative passive form', - pattern: AllomorphPattern( - patterns: { - 'かれない': ['く'], - 'がれない': ['ぐ'], - 'されない': ['す'], - 'たれない': ['つ', 'る', 'う'], - 'なれない': ['ぬ'], - 'ばれない': ['ぶ'], - 'まれない': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegativePassive = LemmatizationRule( + name: 'Godan verb - negative passive form', + pattern: AllomorphPattern( + patterns: { + 'かれない': ['く'], + 'がれない': ['ぐ'], + 'されない': ['す'], + 'たれない': ['つ', 'る', 'う'], + 'なれない': ['ぬ'], + 'ばれない': ['ぶ'], + 'まれない': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative causative form', - pattern: AllomorphPattern( - patterns: { - 'かせない': ['く'], - 'がせない': ['ぐ'], - 'させない': ['す'], - 'たせない': ['つ', 'る', 'う'], - 'なせない': ['ぬ'], - 'ばせない': ['ぶ'], - 'ませない': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegativeCausative = LemmatizationRule( + name: 'Godan verb - negative causative form', + pattern: AllomorphPattern( + patterns: { + 'かせない': ['く'], + 'がせない': ['ぐ'], + 'させない': ['す'], + 'たせない': ['つ', 'る', 'う'], + 'なせない': ['ぬ'], + 'ばせない': ['ぶ'], + 'ませない': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative causative-passive form', - pattern: AllomorphPattern( - patterns: { - 'かされない': ['く'], - 'がされない': ['ぐ'], - 'されない': ['す'], - 'たされない': ['つ', 'る', 'う'], - 'なされない': ['ぬ'], - 'ばされない': ['ぶ'], - 'まされない': ['む'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegativeCausativePassive = LemmatizationRule( + name: 'Godan verb - negative causative-passive form', + pattern: AllomorphPattern( + patterns: { + 'かされない': ['く'], + 'がされない': ['ぐ'], + 'されない': ['す'], + 'たされない': ['つ', 'る', 'う'], + 'なされない': ['ぬ'], + 'ばされない': ['ぶ'], + 'まされない': ['む'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative imperative form', - pattern: AllomorphPattern( - patterns: { - 'うな': ['う'], - 'くな': ['く'], - 'ぐな': ['ぐ'], - 'すな': ['す'], - 'つな': ['つ'], - 'ぬな': ['ぬ'], - 'ぶな': ['ぶ'], - 'むな': ['む'], - 'るな': ['る'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegativeImperative = LemmatizationRule( + name: 'Godan verb - negative imperative form', + pattern: AllomorphPattern( + patterns: { + 'うな': ['う'], + 'くな': ['く'], + 'ぐな': ['ぐ'], + 'すな': ['す'], + 'つな': ['つ'], + 'ぬな': ['ぬ'], + 'ぶな': ['ぶ'], + 'むな': ['む'], + 'るな': ['る'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - desire form', - pattern: AllomorphPattern( - patterns: { - 'きたい': ['く'], - 'ぎたい': ['ぐ'], - 'したい': ['す'], - 'ちたい': ['つ'], - 'にたい': ['ぬ'], - 'びたい': ['ぶ'], - 'みたい': ['む'], - 'りたい': ['る'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbDesire = LemmatizationRule( + name: 'Godan verb - desire form', + pattern: AllomorphPattern( + patterns: { + 'きたい': ['く'], + 'ぎたい': ['ぐ'], + 'したい': ['す'], + 'ちたい': ['つ'], + 'にたい': ['ぬ'], + 'びたい': ['ぶ'], + 'みたい': ['む'], + 'りたい': ['る'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative desire form', - pattern: AllomorphPattern( - patterns: { - 'いたくない': ['う'], - 'きたくない': ['く'], - 'ぎたくない': ['ぐ'], - 'したくない': ['す'], - 'ちたくない': ['つ'], - 'にたくない': ['ぬ'], - 'びたくない': ['ぶ'], - 'みたくない': ['む'], - 'りたくない': ['る'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegativeDesire = LemmatizationRule( + name: 'Godan verb - negative desire form', + pattern: AllomorphPattern( + patterns: { + 'いたくない': ['う'], + 'きたくない': ['く'], + 'ぎたくない': ['ぐ'], + 'したくない': ['す'], + 'ちたくない': ['つ'], + 'にたくない': ['ぬ'], + 'びたくない': ['ぶ'], + 'みたくない': ['む'], + 'りたくない': ['る'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - past desire form', - pattern: AllomorphPattern( - patterns: { - 'きたかった': ['く'], - 'ぎたかった': ['ぐ'], - 'したかった': ['す'], - 'ちたかった': ['つ'], - 'にたかった': ['ぬ'], - 'びたかった': ['ぶ'], - 'みたかった': ['む'], - 'りたかった': ['る'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbPastDesire = LemmatizationRule( + name: 'Godan verb - past desire form', + pattern: AllomorphPattern( + patterns: { + 'きたかった': ['く'], + 'ぎたかった': ['ぐ'], + 'したかった': ['す'], + 'ちたかった': ['つ'], + 'にたかった': ['ぬ'], + 'びたかった': ['ぶ'], + 'みたかった': ['む'], + 'りたかった': ['る'], + }, + type: LemmatizationRuleType.suffix, ), - LemmatizationRule( - name: 'Godan verb - negative past desire form', - pattern: AllomorphPattern( - patterns: { - 'いたくなかった': ['う'], - 'きたくなかった': ['く'], - 'ぎたくなかった': ['ぐ'], - 'したくなかった': ['す'], - 'ちたくなかった': ['つ'], - 'にたくなかった': ['ぬ'], - 'びたくなかった': ['ぶ'], - 'みたくなかった': ['む'], - 'りたくなかった': ['る'], - }, - type: LemmatizationRuleType.suffix, - ), - validChildClasses: [WordClass.godanVerb], - wordClass: WordClass.godanVerb, + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final LemmatizationRule godanVerbNegativePastDesire = LemmatizationRule( + name: 'Godan verb - negative past desire form', + pattern: AllomorphPattern( + patterns: { + 'いたくなかった': ['う'], + 'きたくなかった': ['く'], + 'ぎたくなかった': ['ぐ'], + 'したくなかった': ['す'], + 'ちたくなかった': ['つ'], + 'にたくなかった': ['ぬ'], + 'びたくなかった': ['ぶ'], + 'みたくなかった': ['む'], + 'りたくなかった': ['る'], + }, + type: LemmatizationRuleType.suffix, ), + validChildClasses: [WordClass.godanVerb], + wordClass: WordClass.godanVerb, +); + +final List godanVerbLemmatizationRules = [ + godanVerbBase, + godanVerbNegative, + godanVerbPast, + godanVerbTe, + godanVerbTeiru, + godanVerbTeita, + godanVerbConditional, + godanVerbVolitional, + godanVerbPotential, + godanVerbPassive, + godanVerbCausative, + godanVerbCausativePassive, + godanVerbImperative, + godanVerbNegativePast, + godanVerbNegativeTe, + godanVerbNegativeConditional, + godanVerbNegativeVolitional, + godanVerbNegativePotential, + godanVerbNegativePassive, + godanVerbNegativeCausative, + godanVerbNegativeCausativePassive, + godanVerbNegativeImperative, + godanVerbDesire, + godanVerbNegativeDesire, + godanVerbPastDesire, + godanVerbNegativePastDesire, ]; diff --git a/lib/util/lemmatizer/rules/i_adjectives.dart b/lib/util/lemmatizer/rules/i_adjectives.dart index 7e251e1..8ab2947 100644 --- a/lib/util/lemmatizer/rules/i_adjectives.dart +++ b/lib/util/lemmatizer/rules/i_adjectives.dart @@ -1,61 +1,77 @@ import 'package:jadb/util/lemmatizer/lemmatizer.dart'; -List iAdjectiveLemmatizationRules = [ - LemmatizationRule.simple( - name: 'I adjective - base form', - terminal: true, - pattern: 'い', - replacement: 'い', - validChildClasses: [WordClass.iAdjective], - wordClass: WordClass.iAdjective, - ), - LemmatizationRule.simple( - name: 'I adjective - negative form', - pattern: 'くない', - replacement: 'い', - validChildClasses: [WordClass.iAdjective], - wordClass: WordClass.iAdjective, - ), - LemmatizationRule.simple( - name: 'I adjective - past form', - pattern: 'かった', - replacement: 'い', - validChildClasses: [WordClass.iAdjective], - wordClass: WordClass.iAdjective, - ), - LemmatizationRule.simple( - name: 'I adjective - negative past form', - pattern: 'くなかった', - replacement: 'い', - validChildClasses: [WordClass.iAdjective], - wordClass: WordClass.iAdjective, - ), - LemmatizationRule.simple( - name: 'I adjective - te-form', - pattern: 'くて', - replacement: 'い', - validChildClasses: [WordClass.iAdjective], - wordClass: WordClass.iAdjective, - ), - LemmatizationRule.simple( - name: 'I adjective - conditional form', - pattern: 'ければ', - replacement: 'い', - validChildClasses: [WordClass.iAdjective], - wordClass: WordClass.iAdjective, - ), - LemmatizationRule.simple( - name: 'I adjective - volitional form', - pattern: 'かろう', - replacement: 'い', - validChildClasses: [WordClass.iAdjective], - wordClass: WordClass.iAdjective, - ), - LemmatizationRule.simple( - name: 'I adjective - continuative form', - pattern: 'く', - replacement: 'い', - validChildClasses: [WordClass.iAdjective], - wordClass: WordClass.iAdjective, - ), +final LemmatizationRule iAdjectiveBase = LemmatizationRule.simple( + name: 'I adjective - base form', + terminal: true, + pattern: 'い', + replacement: 'い', + validChildClasses: [WordClass.iAdjective], + wordClass: WordClass.iAdjective, +); + +final LemmatizationRule iAdjectiveNegative = LemmatizationRule.simple( + name: 'I adjective - negative form', + pattern: 'くない', + replacement: 'い', + validChildClasses: [WordClass.iAdjective], + wordClass: WordClass.iAdjective, +); + +final LemmatizationRule iAdjectivePast = LemmatizationRule.simple( + name: 'I adjective - past form', + pattern: 'かった', + replacement: 'い', + validChildClasses: [WordClass.iAdjective], + wordClass: WordClass.iAdjective, +); + +final LemmatizationRule iAdjectiveNegativePast = LemmatizationRule.simple( + name: 'I adjective - negative past form', + pattern: 'くなかった', + replacement: 'い', + validChildClasses: [WordClass.iAdjective], + wordClass: WordClass.iAdjective, +); + +final LemmatizationRule iAdjectiveTe = LemmatizationRule.simple( + name: 'I adjective - te-form', + pattern: 'くて', + replacement: 'い', + validChildClasses: [WordClass.iAdjective], + wordClass: WordClass.iAdjective, +); + +final LemmatizationRule iAdjectiveConditional = LemmatizationRule.simple( + name: 'I adjective - conditional form', + pattern: 'ければ', + replacement: 'い', + validChildClasses: [WordClass.iAdjective], + wordClass: WordClass.iAdjective, +); + +final LemmatizationRule iAdjectiveVolitional = LemmatizationRule.simple( + name: 'I adjective - volitional form', + pattern: 'かろう', + replacement: 'い', + validChildClasses: [WordClass.iAdjective], + wordClass: WordClass.iAdjective, +); + +final LemmatizationRule iAdjectiveContinuative = LemmatizationRule.simple( + name: 'I adjective - continuative form', + pattern: 'く', + replacement: 'い', + validChildClasses: [WordClass.iAdjective], + wordClass: WordClass.iAdjective, +); + +final List iAdjectiveLemmatizationRules = [ + iAdjectiveBase, + iAdjectiveNegative, + iAdjectivePast, + iAdjectiveNegativePast, + iAdjectiveTe, + iAdjectiveConditional, + iAdjectiveVolitional, + iAdjectiveContinuative, ]; diff --git a/lib/util/lemmatizer/rules/ichidan_verbs.dart b/lib/util/lemmatizer/rules/ichidan_verbs.dart index 7c0f0a0..c798170 100644 --- a/lib/util/lemmatizer/rules/ichidan_verbs.dart +++ b/lib/util/lemmatizer/rules/ichidan_verbs.dart @@ -1,7 +1,7 @@ import 'package:jadb/util/lemmatizer/lemmatizer.dart'; import 'package:jadb/util/text_filtering.dart'; -List lookBehinds = [ +final List _lookBehinds = [ kanjiRegex, 'き', 'ぎ', @@ -28,214 +28,270 @@ List lookBehinds = [ 'れ', ]; -List ichidanVerbLemmatizationRules = [ - LemmatizationRule.simple( - name: 'Ichidan verb - base form', - terminal: true, - pattern: 'る', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative form', - pattern: 'ない', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - past form', - pattern: 'た', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - te-form', - pattern: 'て', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - te-form with いる', - pattern: 'ている', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - te-form with いた', - pattern: 'ていた', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - conditional form', - pattern: 'れば', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - volitional form', - pattern: 'よう', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - potential form', - pattern: 'られる', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - passive form', - pattern: 'られる', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - causative form', - pattern: 'させる', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - causative passive form', - pattern: 'させられる', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - imperative form', - pattern: 'れ', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative past form', - pattern: 'なかった', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative te-form', - pattern: 'なくて', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative conditional form', - pattern: 'なければ', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative volitional form', - pattern: 'なかろう', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative potential form', - pattern: 'られない', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative passive form', - pattern: 'られない', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative causative form', - pattern: 'させない', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative causative passive form', - pattern: 'させられない', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative imperative form', - pattern: 'るな', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - desire form', - pattern: 'たい', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative desire form', - pattern: 'たくない', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - past desire form', - pattern: 'たかった', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), - LemmatizationRule.simple( - name: 'Ichidan verb - negative past desire form', - pattern: 'たくなかった', - replacement: 'る', - lookAheadBehind: lookBehinds, - validChildClasses: [WordClass.ichidanVerb], - wordClass: WordClass.ichidanVerb, - ), +final LemmatizationRule ichidanVerbBase = LemmatizationRule.simple( + name: 'Ichidan verb - base form', + terminal: true, + pattern: 'る', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbNegative = LemmatizationRule.simple( + name: 'Ichidan verb - negative form', + pattern: 'ない', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); +final LemmatizationRule ichidanVerbPast = LemmatizationRule.simple( + name: 'Ichidan verb - past form', + pattern: 'た', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbTe = LemmatizationRule.simple( + name: 'Ichidan verb - te-form', + pattern: 'て', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbTeiru = LemmatizationRule.simple( + name: 'Ichidan verb - te-form with いる', + pattern: 'ている', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbTeita = LemmatizationRule.simple( + name: 'Ichidan verb - te-form with いた', + pattern: 'ていた', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbConditional = LemmatizationRule.simple( + name: 'Ichidan verb - conditional form', + pattern: 'れば', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbVolitional = LemmatizationRule.simple( + name: 'Ichidan verb - volitional form', + pattern: 'よう', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbPotential = LemmatizationRule.simple( + name: 'Ichidan verb - potential form', + pattern: 'られる', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbPassive = LemmatizationRule.simple( + name: 'Ichidan verb - passive form', + pattern: 'られる', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbCausative = LemmatizationRule.simple( + name: 'Ichidan verb - causative form', + pattern: 'させる', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbCausativePassive = LemmatizationRule.simple( + name: 'Ichidan verb - causative passive form', + pattern: 'させられる', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbImperative = LemmatizationRule.simple( + name: 'Ichidan verb - imperative form', + pattern: 'れ', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbNegativePast = LemmatizationRule.simple( + name: 'Ichidan verb - negative past form', + pattern: 'なかった', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbNegativeTe = LemmatizationRule.simple( + name: 'Ichidan verb - negative te-form', + pattern: 'なくて', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbNegativeConditional = + LemmatizationRule.simple( + name: 'Ichidan verb - negative conditional form', + pattern: 'なければ', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, + ); + +final LemmatizationRule ichidanVerbNegativeVolitional = + LemmatizationRule.simple( + name: 'Ichidan verb - negative volitional form', + pattern: 'なかろう', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, + ); + +final LemmatizationRule ichidanVerbNegativePotential = LemmatizationRule.simple( + name: 'Ichidan verb - negative potential form', + pattern: 'られない', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbNegativePassive = LemmatizationRule.simple( + name: 'Ichidan verb - negative passive form', + pattern: 'られない', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbNegativeCausative = LemmatizationRule.simple( + name: 'Ichidan verb - negative causative form', + pattern: 'させない', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbNegativeCausativePassive = + LemmatizationRule.simple( + name: 'Ichidan verb - negative causative passive form', + pattern: 'させられない', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, + ); + +final LemmatizationRule ichidanVerbNegativeImperative = + LemmatizationRule.simple( + name: 'Ichidan verb - negative imperative form', + pattern: 'るな', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, + ); + +final LemmatizationRule ichidanVerbDesire = LemmatizationRule.simple( + name: 'Ichidan verb - desire form', + pattern: 'たい', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbNegativeDesire = LemmatizationRule.simple( + name: 'Ichidan verb - negative desire form', + pattern: 'たくない', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbPastDesire = LemmatizationRule.simple( + name: 'Ichidan verb - past desire form', + pattern: 'たかった', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, +); + +final LemmatizationRule ichidanVerbNegativePastDesire = + LemmatizationRule.simple( + name: 'Ichidan verb - negative past desire form', + pattern: 'たくなかった', + replacement: 'る', + lookAheadBehind: _lookBehinds, + validChildClasses: [WordClass.ichidanVerb], + wordClass: WordClass.ichidanVerb, + ); + +final List ichidanVerbLemmatizationRules = [ + ichidanVerbBase, + ichidanVerbNegative, + ichidanVerbPast, + ichidanVerbTe, + ichidanVerbTeiru, + ichidanVerbTeita, + ichidanVerbConditional, + ichidanVerbVolitional, + ichidanVerbPotential, + ichidanVerbPassive, + ichidanVerbCausative, + ichidanVerbCausativePassive, + ichidanVerbImperative, + ichidanVerbNegativePast, + ichidanVerbNegativeTe, + ichidanVerbNegativeConditional, + ichidanVerbNegativeVolitional, + ichidanVerbNegativePotential, + ichidanVerbNegativePassive, + ichidanVerbNegativeCausative, + ichidanVerbNegativeCausativePassive, + ichidanVerbNegativeImperative, + ichidanVerbDesire, + ichidanVerbNegativeDesire, + ichidanVerbPastDesire, + ichidanVerbNegativePastDesire, ];