Registry / pluralizer

pluralizer

JSON →
library2.0.0pypypi✓ verified 84d ago

The `pluralizer` library is a Python port of the widely used `blakeembrey/pluralize` JavaScript library, enabling the conversion of words between singular and plural forms based on a comprehensive set of predefined rules. Currently at version 2.0.0, it is actively maintained and supports Python 3.10 and newer.

pip install pluralizer
INSTALL
IMPORT
SIG · PLURALIZER
P
pluralizer
pythonv2.0.0
Install
1.5s avg
Import
43ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.044s · 17.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.5s · import 0.043s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Pluralizer
from pluralizer import Pluralizer
import pluralizer
The library exposes its functionality via the `Pluralizer` class, not directly from the package module.

Initialize the `Pluralizer` class and use its methods for word transformations, including `pluralize`, `singular`, `is_plural`, and `is_singular`. The `pluralize` method also supports arguments for count and prepending the number.

from pluralizer import Pluralizer pluralizer = Pluralizer() # Basic pluralization print(f"Plural of 'apple': {pluralizer.pluralize('apple')}") print(f"Plural of 'cat': {pluralizer.plural('cat')}") # Basic singularization print(f"Singular of 'apples': {pluralizer.singular('apples')}") # Pluralize with count and prepend print(f"1 apple (prepend=True): {pluralizer.pluralize('apple', 1, True)}") print(f"2 apples (prepend=True): {pluralizer.pluralize('apple', 2, True)}") # Check if word is plural or singular print(f"Is 'apples' plural? {pluralizer.is_plural('apples')}") print(f"Is 'apple' singular? {pluralizer.is_singular('apple')}")
Debug
Known issues
breakingVersion 2.0.0 introduced a breaking change by converting all method names from `camelCase` to `snake_case` (e.g., `isPlural` became `is_plural`).
fix
Update your code to use the new `snake_case` method names, such as `pluralize()`, `singular()`, `is_plural()`, and `is_singular()`.
affects: >=2.0.0
breakingAs of version 2.0.0, the `pluralizer` library requires Python 3.10 or later.
fix
Ensure your project's Python interpreter is version 3.10 or newer. Upgrade Python if necessary.
affects: >=2.0.0
gotchaThe `pluralizer` library operates based on a set of predefined rules and may not handle all irregular English words or proper nouns perfectly, unlike more extensive NLP libraries.
fix
For highly nuanced or domain-specific pluralization/singularization, consider augmenting with custom rules or using a more comprehensive NLP library if `pluralizer` does not meet specific requirements for accuracy.
affects: All
Errors
Common errors & fixes
AttributeError: 'Pluralizer' object has no attribute 'isPlural'
Attempting to use `camelCase` method names (e.g., `isPlural`) after upgrading to `pluralizer` version 2.0.0 or higher.
fix
Replace `camelCase` method calls with their `snake_case` equivalents, such as `pluralizer.is_plural('word')`.
TypeError: pluralize() missing 1 required positional argument: 'self'
Trying to call `pluralizer.pluralize()` directly on the imported module instead of an instance of the `Pluralizer` class.
fix
Instantiate the `Pluralizer` class first: `from pluralizer import Pluralizer; pluralizer_instance = Pluralizer(); pluralizer_instance.pluralize('word')`.
Upgrade
Version history
2.0.0latest on PyPI · released Jun 11, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
pluralizer — pip install pluralizer · libregistry