feat: correct regular inflected forms that should be irregular #2186
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues
N/A
Description
Corrects incorrect regular inflected forms that should be irregular:
This includes when the incorrect regular form required doubling the last letter of the verb lemma:
It also corrects incorrect forms that are regular but that involve changes to endings:
I reworked a number of dictionary entries because the
Sflag simultaneously makes noun plurals and verb 3rd person singular present forms, but whilemansis a legit verb it's not a legit noun for instance.Draft for now because:
This linter reveals a bug in the assertion functions such as
assert_top3_suggestion_result.I've noticed that for this linter, the order in which suggestions are generated is inconsistent between runs. I'm not sure if this happens for all linters but has just never surfaced before, or if it's due to this linter's use of phf.
I'm using phf because my LLM suggested it was the best way to make sure the table of irregular forms is only built once. phf was already used in the Harper project in
named_entities.rs, something to do with "web atoms". (I don't understand the relationship yet.) But it wasn't used inharper-coreuntil now.Which brings me to my next question:
Also I'm looking for tips on how to unify the irregular verb tables between this linter and the
SimplePastToPastParticiplelinter.I'm guessing a JSON file but I'm not sure how/where to implement the parsing of it to make sure it only happens once.
How Has This Been Tested?
Unit tests are included.
Checklist