fix(core): add seven derived irregular verbs to the verb list - #4039
Open
mauropereiira wants to merge 3 commits into
Open
fix(core): add seven derived irregular verbs to the verb list#4039mauropereiira wants to merge 3 commits into
mauropereiira wants to merge 3 commits into
Conversation
Follow-up to Automattic#4036, which added "understand" and fixed Automattic#3916. `harper-core/irregular_verbs.json` carries the base verbs but is missing many of their derived forms, so `DidPast` and `HelpedPast` silently do nothing for those verbs. Adds forsake, oversee, rebuild, retake, rewrite, withhold and withstand. Only these seven were added. The curated dictionary tags their preterite forms as verbs, which is what the linters' expressions require before the lemma lookup ever happens. Another twelve derived verbs are also absent from the list, but their past forms carry no verb metadata in the dictionary, so adding them here alone would have no effect. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
harper-asciidoc@2.8.0 harper-brill@2.8.0 harper-comments@2.8.0 harper-core@2.8.0 harper-dictionary-wordlist@2.8.0 harper-git-commit@2.8.0 harper-html@2.8.0 harper-ink@2.8.0 harper-jjdescription@2.8.0 harper-literate-haskell@2.8.0 harper-ls@2.8.0 harper-pos-utils@2.8.0 harper-python@2.8.0 harper-stats@2.8.0 harper-tex@2.8.0 harper-thesaurus@2.8.0 harper-tree-sitter@2.8.0 harper-typst@2.8.0 Generated by cargo-workspaces
Collaborator
|
When working on the irregular verbs (or irregular plurals) it's a good idea to try to match your changes in both |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Follow-up to #4036 (which fixed #3916). No separate issue, this is the continuation I offered there.
Description
harper-core/irregular_verbs.jsoncontains the base irregular verbs but is missing many of their common derived forms.IrregularVerbsis consumed bydid_past.rs,will_non_lemma.rs,helped_past.rs,simple_past_to_past_participle.rsandregular_irregulars.rs, so a missing entry silently disables those rules for that verb.Measured on
master, using a verb that is present versus one that is not:This adds seven entries:
Why only seven
I originally had a list of nineteen, but most of them do nothing on their own.
The linters' expressions require the past form to be tagged as a verb before the lemma lookup is ever reached. Only these seven have preterite forms that the curated dictionary tags that way. I verified each one by building and testing rather than assuming:
So
withdraw,misunderstand,befall,foresee,forgive,outgrow,overcome,overhear,undergo,undertake,unwindandupholdare still missing from the list, but adding them here would change nothing. They need dictionary metadata first, which looked like a separate curation change rather than something to smuggle into this PR. Happy to take that on if you want it, just wanted to check the direction first.I also deliberately excluded invariant-form verbs such as
beset,offsetandupset, where all three forms are identical.Demo
Not applicable, CLI output below.
How Has This Been Tested?
cargo test -p harper-core— 6126 + 42 tests pass, 0 failures, no snapshot changes.Manually with
cargo run --bin harper-cli --release -- lint, comparing a build ofmasteragainst this branch.Now flagged, previously silent:
Still clean:
AI Disclosure
Checklist
Two tests were added rather than one per verb, since they all exercise the same lookup path and the maintainers have asked contributors to trim unnecessary tests.