I started implementing conjugation handling:
I havenβt handled volitional/potential/causative/etcβ¦ yet, only basic stuff like negatives and γγ»γ¦ forms.
Itβs also a very simplistic approach using regex which canβt handle the virtually infinite combinations of Japanese agglutination grammar. So θ¦γ¦γγ is handled but θ¦γ¦γγͺγγ£γ isnβt. I could just add more regex to handle more cases but the total combinatorial of all possible verb forms is extremely large.
const deconjugation_table = [
// Verb γΎγ forms
[/(γ(γΎγ|γΎγγ(γ§γγ)?|γΎγγ))$/, '($1|γγ|γ)$'],
[/(γ(γΎγ|γΎγγ(γ§γγ)?|γΎγγ))$/, '($1|γγ|γ|γγ)$'],
[/(γ(γΎγ|γΎγγ(γ§γγ)?|γΎγγ))$/, '($1|γγ|γ)$'],
[/(γ(γΎγ|γΎγγ(γ§γγ)?|γΎγγ))$/, '($1|γγ|γ|γγ)$'],
[/(γ‘(γΎγ|γΎγγ(γ§γγ)?|γΎγγ))$/, '($1|γ‘γ|γ€)$'],
[/(γ«(γΎγ|γΎγγ(γ§γγ)?|γΎγγ))$/, '($1|γ«γ|γ¬)$'],
[/(γ³(γΎγ|γΎγγ(γ§γγ)?|γΎγγ))$/, '($1|γ³γ|γΆ)$'],
[/(γΏ(γΎγ|γΎγγ(γ§γγ)?|γΎγγ))$/, '($1|γΏγ|γ)$'],
[/(γ(γΎγ|γΎγγ(γ§γγ)?|γΎγγ))$/, '($1|γ?γ)$'],
[/(γΎγ|γΎγγ(γ§γγ)?|γΎγγ)$/, '($1|γ)$'],
// Godan verb negative
[/(γγͺγ)$/, '($1|γ|γγ)$'],
[/(γγͺγ)$/, '($1|γ|γγ)$'],
[/(γγͺγ)$/, '($1|γ|γγ)$'],
[/(γγͺγ)$/, '($1|γ|γγ)$'],
[/(γͺγͺγ)$/, '($1|γ¬|γͺγ)$'],
[/(γ°γͺγ)$/, '($1|γΆ|γ°γ)$'],
[/(γΎγͺγ)$/, '($1|γ|γΎγ)$'],
[/(γγͺγ)$/, '($1|γ|γγ)$'],
// γγ special case
[/(γγͺγ)$/, '($1|γγ|γγ)$'],
// Adjectives γγ»γ¦ + negative
[/(γγͺγ|γγ£γ|γγͺγγ£γ)$/, '($1|γ)$'],
[/(γγ¦|γγͺγγ¦)$/, '($1|γ)$'],
// Verb γγ»γ¦ forms
[/(γ£γ¦(γ?γ)?)$/, '($1|γ|γ|γ€)$'],
[/(γ£γ)$/, '($1|γ|γ|γ€)$'],
[/(γγ¦(γ?γ)?)$/, '($1|γ|γγ)$'],
[/(γγ)$/, '($1|γ|γγ)$'],
[/(γγ§(γ?γ)?)$/, '($1|γ)$'],
[/(γγ )$/, '($1|γ)$'],
[/(γγ§(γ?γ)?)$/, '($1|γ|γΆ|γ¬)$'],
[/(γγ )$/, '($1|γ|γΆ|γ¬)$'],
[/(γγ¦(γ?γ)?)$/, '($1|γγ?|γγ)$'],
[/(γγ)$/, '($1|γγ?|γγ)$'],
[/(γ¦(γ?γ)?)$/, '($1|γ)$'],
[/(γ)$/, '($1|γ)$'],
// Ichidan verb negative (needs to come last not to match against godan and
// adjectives)
[/(γͺγ)$/, '($1|γ)$'],
]