{"id":23959,"library":"lemminflect","title":"LemmInflect","description":"A Python module for English lemmatization and inflection (generating inflected forms from lemmas). It provides a lookup-based and rule-based approach for verbs, nouns, adjectives, and adverbs. Current version: 0.2.3 (last release April 2022). Release cadence is low.","status":"maintenance","version":"0.2.3","language":"python","source_language":"en","source_url":"https://github.com/bjascob/LemmInflect","tags":["lemmatization","inflection","nlp","english","morphology"],"install":[{"cmd":"pip install lemminflect","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Used internally for array operations; may be optional in future builds.","package":"numpy","optional":true}],"imports":[{"note":"Direct import of the lemmatization function.","symbol":"getLemma","correct":"from lemminflect import getLemma"},{"note":"Direct import of the inflection function.","symbol":"getInflection","correct":"from lemminflect import getInflection"},{"note":"Import all inflections (returns dict of all forms).","symbol":"getAllInflections","correct":"from lemminflect import getAllInflections"},{"note":"Import all lemmas (returns dict of all lemma forms).","symbol":"getAllLemmas","correct":"from lemminflect import getAllLemmas"},{"note":"Check if a tag corresponds to the base form of a word.","symbol":"isTagBaseForm","correct":"from lemminflect import isTagBaseForm"}],"quickstart":{"code":"from lemminflect import getLemma, getInflection\n\n# Lemmatize a word\nlemma = getLemma('flies', 'VERB')\nprint(f\"Lemma: {lemma}\")  # Output: 'fly'\n\n# Inflect a lemma to a specific form\ninflected = getInflection('fly', 'VBD')\nprint(f\"Inflected: {inflected}\")  # Output: ('flew',)\n\n# Note: POS tags are Penn Treebank-like (NN, VB, JJ, etc.)","lang":"python","description":"Basic lemmatization and inflection using Penn Treebank POS tags."},"warnings":[{"fix":"Use PTB tags: VB (verb base), VBD (past), VBG (gerund), VBN (past participle), VBP (present non-3rd), VBZ (present 3rd), NN (noun), NNS (plural noun), JJ (adjective), JJR (comparative), JJS (superlative), RB (adverb), RBR (comparative adverb), RBS (superlative adverb).","message":"POS tags must be in Penn Treebank format (e.g., 'VB', 'VBD', 'NN', 'JJ', etc.) not Universal Dependencies. Using wrong tags returns empty results silently.","severity":"gotcha","affected_versions":"all"},{"fix":"Always check the return value: e.g., result = getLemma('word', 'NN'); if result: ... else: handle unknown.","message":"The function returns an empty list/tuple if the word is unknown or the lemma cannot be found. It does not raise exceptions.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider using spaCy's built-in lemmatizer or the 'simplemma' library for active development.","message":"The module is not actively maintained; last release 0.2.3 was in 2022. No support for newer spaCy versions or Python 3.12+ out of the box.","severity":"deprecated","affected_versions":"0.2.3"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use fallback to a rule-based lemmatizer (e.g., NLTK's WordNetLemmatizer) or add custom mappings.","cause":"LemmInflect relies heavily on a lookup dictionary. Some irregular forms may be missing or have gaps.","error":"lemminflect doesn't handle 'ran' as past tense of 'run'"},{"fix":"Check if the lemma exists: getLemma('fly', 'VB') should return 'fly'. Then try getInflection with the correct lemma. If still empty, consider using getAllInflections('fly') to see all known forms.","cause":"The word lemma 'fly' is stored but the past tense form 'flew' might be missing from the inflections dictionary in some cases.","error":"getInflection('fly', 'VBD') returns an empty tuple"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}