Skip to content

fix: use wordnet morphy to reject inflected verb forms#14

Merged
benner merged 5 commits into
mainfrom
feat/improve/reliability
Mar 22, 2026
Merged

fix: use wordnet morphy to reject inflected verb forms#14
benner merged 5 commits into
mainfrom
feat/improve/reliability

Conversation

@benner

@benner benner commented Mar 22, 2026

Copy link
Copy Markdown
Owner
  • refactor: remove hardcoded verb allowlist
  • feat: add wordnet fallback for tagger misclassifications
  • feat: use wordnet morphy to reject inflected verb forms
  • fix: use infinitive context for POS tagging
  • fix: reject -ing/-ed suffixes before POS tagging

benner added 5 commits March 22, 2026 10:01
Morphological suffixes are unambiguous signals of non-imperative
forms — no tagger context needed.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
'to [verb]' reliably produces VB for base-form verbs, unlike 'i'
which produces VBP and misclassifies some verbs as NN.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
Catches third-person singular (-s/-es) and other inflected forms
the suffix regex misses, with a clear error naming the base verb.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
Some valid imperative verbs like 'disable' are tagged non-VB in
certain contexts. Wordnet morphy confirms them as base-form verbs.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
The combination of suffix checks, morphy inflection detection, POS
tagging, and wordnet fallback is sufficient — no manual exceptions
needed.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
@benner benner force-pushed the feat/improve/reliability branch from e985d71 to 7b0a6fe Compare March 22, 2026 08:22
@benner benner marked this pull request as ready for review March 22, 2026 08:24
@benner benner merged commit 86279f4 into main Mar 22, 2026
2 checks passed
@benner benner deleted the feat/improve/reliability branch March 22, 2026 08:24
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

Successfully merging this pull request may close these issues.

1 participant