wordnet-morphy

Crates.iowordnet-morphy
lib.rswordnet-morphy
version0.1.3
created_at2026-01-01 10:54:08.812791+00
updated_at2026-01-01 12:53:48.904059+00
descriptionWordNet morphology rules and lookup helpers for lemmas and inflections.
homepagehttps://github.com/johanneswd/crosswordsolver
repositoryhttps://github.com/johanneswd/crosswordsolver
max_upload_size
id2016049
size16,171
(johanneswd)

documentation

https://docs.rs/wordnet-morphy

README

wordnet-morphy

WordNet-style morphological processing (morphy) for lemmatization. It checks exception lists, applies POS-specific suffix rules, and verifies candidates through a caller-supplied predicate (typically backed by wordnet-db) while sharing POS types from wordnet-types.

Why it's fast

  • Pre-parsed exception files (*.exc) cached in memory for O(1) lookups.
  • Fixed suffix rule tables per POS keep candidate generation tight and branch-light.
  • No allocations for unchanged surface forms; minimal cloning otherwise, with normalization kept simple.

What you can do

  • Lemmatize inflected forms into canonical WordNet lemmas (e.g., “running” → “run”).
  • Carry provenance for each candidate (surface, exception, or rule-based) to inform downstream ranking.
  • Plug into any loader via the lemma_exists callback—commonly WordNet::lemma_exists from wordnet-db.

Related crates

  • wordnet-db: supplies the lemma existence predicate used to confirm morphy candidates.
  • wordnet-types: provides the shared Pos enum and other types used in morphy APIs.

Docs

Commit count: 0

cargo fmt