inflect
Correctly generate plurals, singular nouns, ordinals, indefinite articles
Decision gist · record as of 2026-08-14
Yes. inflect is a mature, actively maintained library with no known vulnerabilities, permissive licensing, and low install friction. It solves a real problem in English text generation that is tedious to handle manually. Install it if your application generates user-facing English text that must agree in number or convert numbers to words.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low friction: pure Python wheel with three lightweight runtime dependencies (more_itertools, typeguard, typing_extensions).
- Actively maintained with recent commits and stable release history since 2010.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2024-12-28 (594 days) · last repo commit 2026-04-13 · 1,082 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 31,561,361 downloads/mo, #785 on PyPI
Alternatives
Verify before relying
pip install inflect
import inflect
p = inflect.engine()
print(p.plural('person')) # 'people'
print(p.number_to_words(243)) # 'two hundred and forty-three'- Whether classical plural modes (Latin/Greek conventions) cover all edge cases users encounter
- Performance characteristics with very large numbers or repeated calls in high-throughput scenarios
What it is and what it does
inflect is a pure-Python library that applies English morphology rules to transform words and numbers. It handles pluralization and singularization of nouns, verbs, and adjectives; converts numerals to ordinal form (1st, 2nd, 3rd); generates correct indefinite articles (a vs. an); and converts numbers into their word-based representations (243 becomes 'two hundred and forty-three'). The library exposes an engine object with methods for each transformation, and supports classical Latin and Greek plural conventions as an optional mode.
The package is designed for text generation, templating, and natural language output in English-language applications. It depends on more_itertools, typeguard, and typing_extensions for runtime support. Most use cases instantiate a single engine and call methods on it to format user-facing text—error messages, reports, or templated strings that need grammatically correct singular/plural agreement and number-to-word conversion.
Use it for
- Generate grammatically correct error or status messages that agree in number with a count (e.g., '1 error' vs. '2 errors')
- Convert numeric values to human-readable words in reports, invoices, or legal documents
- Format list output with correct articles and conjunctions (e.g., 'apple, banana, and carrot')
- Build templated text that automatically pluralizes nouns and verbs based on a variable count
- Produce ordinal numbers for rankings, dates, or position labels in user-facing output
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
inflect is a mature, actively maintained library with no known vulnerabilities, permissive licensing, and low install friction. It solves a real problem in English text generation that is tedious to handle manually. Install it if your application generates user-facing English text that must agree in number or convert numbers to words.
Install
inflect on PyPI
Before you install
Low friction: pure Python wheel with three lightweight runtime dependencies (more_itertools, typeguard, typing_extensions). Actively maintained with recent commits and stable release history since 2010.
Requires Python 3.9 or later.
License in practice
MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install inflect
import inflect
p = inflect.engine()
print(p.plural('person')) # 'people'
print(p.number_to_words(243)) # 'two hundred and forty-three'
Verify before relying
- Whether classical plural modes (Latin/Greek conventions) cover all edge cases users encounter
- Performance characteristics with very large numbers or repeated calls in high-throughput scenarios
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesmore_itertoolstypeguardtyping_extensions |
| Maintenance | Actively maintained 594 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 31,561,361 / month, #785 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Linguistic |
Evidence: inflect-7.5.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “ordinal number generator”
- inflectGenerates correct English plurals, singulars, ordinals, indefinite…
- num2wordsConverts numbers to their word representations in multiple languages,…
- number-parserConverts numbers written in natural language (e.g., "twenty three")…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pluralizer · Inflector · word2number · unicode-rbnf · inflection · inventree-ipn-generator · jinja2_pluralize · text2digits · roman-numerals · indic-numtowords