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

Incorrect potential form search pattern #961

Open
rbleuse opened this issue Jul 2, 2021 · 2 comments
Open

Incorrect potential form search pattern #961

rbleuse opened this issue Jul 2, 2021 · 2 comments

Comments

@rbleuse
Copy link

rbleuse commented Jul 2, 2021

Hi Martin,

I noticed some issues when looking for a potential inflection :

Yellow : あえます -> あう, あえる (Potential: ....)
That's not correct, in that case that's the masu form of just あえる.

The rule that is applied is
d.add(EndsWithDeinflector("emasu", VerbInflection.Form.ABLE_TO_DO2, mapOf("u" to InflectableWordClass.VERB_GODAN, "eru" to InflectableWordClass.VERB_ICHIDAN)))

Which I think is redundant because
d.add(ShortVerbDeinflector("masu", VerbInflection.Form.POLITE, mapOf("ru" to InflectableWordClass.VERB_ICHIDAN)))
and
d.add(EruDeinflector())
will give the same results, with the correct form applied for あえる (Polite: ...)

I prepared a fix but I don't know if it will break something. At least unit tests are running fine.
Do you know some side effects if we remove that redundant rule ?

Red : あえる -> あえる, あう (Potential: ....)
For あう that's correct, it's the potential form. But あえる is not correct (あえる is not potential form of あえる).
For that one it's a bit tough because the rule EruDeinflector creates both, so VerbInflection.Form.ABLE_TO_DO2 is applied to both results

Do you know why this rule keeps the original deinflection (eru ending for ichidan) in addition to the potential deinflection (u ending for godan) ?

@rbleuse
Copy link
Author

rbleuse commented Jul 4, 2021

Do you know why this rule keeps the original deinflection (eru ending for ichidan) in addition to the potential deinflection (u ending for godan) ?

By reading comments and the code, I think I understood why, it's for the engine to stop after this deinflection (to keep it as a potential result) and to not deinflect taberu into tabu

@mvysny
Copy link
Owner

mvysny commented Jul 29, 2021

Hi Remi, yes that is true. Unfortunately, the current engine is rather simplistic and this is an unfortunate outcome of that simplicity. But perhaps we can find a workaround 🤔

Could you please open a bug report at https://gitlab.com/mvysny/jputils/-/issues to discuss the issue further?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants