{"id":8431,"library":"pluralizer","title":"pluralizer","description":"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.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/weixu365/pluralizer-py","tags":["pluralization","singularization","nlp","string manipulation"],"install":[{"cmd":"pip install pluralizer","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"note":"The library exposes its functionality via the `Pluralizer` class, not directly from the package module.","wrong":"import pluralizer","symbol":"Pluralizer","correct":"from pluralizer import Pluralizer"}],"quickstart":{"code":"from pluralizer import Pluralizer\n\npluralizer = Pluralizer()\n\n# Basic pluralization\nprint(f\"Plural of 'apple': {pluralizer.pluralize('apple')}\")\nprint(f\"Plural of 'cat': {pluralizer.plural('cat')}\")\n\n# Basic singularization\nprint(f\"Singular of 'apples': {pluralizer.singular('apples')}\")\n\n# Pluralize with count and prepend\nprint(f\"1 apple (prepend=True): {pluralizer.pluralize('apple', 1, True)}\")\nprint(f\"2 apples (prepend=True): {pluralizer.pluralize('apple', 2, True)}\")\n\n# Check if word is plural or singular\nprint(f\"Is 'apples' plural? {pluralizer.is_plural('apples')}\")\nprint(f\"Is 'apple' singular? {pluralizer.is_singular('apple')}\")","lang":"python","description":"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."},"warnings":[{"fix":"Update your code to use the new `snake_case` method names, such as `pluralize()`, `singular()`, `is_plural()`, and `is_singular()`.","message":"Version 2.0.0 introduced a breaking change by converting all method names from `camelCase` to `snake_case` (e.g., `isPlural` became `is_plural`).","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure your project's Python interpreter is version 3.10 or newer. Upgrade Python if necessary.","message":"As of version 2.0.0, the `pluralizer` library requires Python 3.10 or later.","severity":"breaking","affected_versions":">=2.0.0"},{"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.","message":"The `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.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"search_vec":"'2.0.0':37 '3.10':45 'activ':40 'base':26 'blakeembrey/pluralize':13 'comprehens':29 'convers':18 'current':34 'enabl':16 'form':25 'javascript':14 'librari':4,15 'maintain':41 'manipul':52 'newer':47 'nlp':50 'plural':1,3,24,48 'port':8 'predefin':32 'python':7,44 'rule':33 'set':30 'singular':22,49 'string':51 'support':43 'use':12 'version':36 'wide':11 'word':20","created_at":"2026-04-16T17:02:08.940224+00:00","updated_at":"2026-04-16T17:02:08.940224+00:00","problems":[{"fix":"Replace `camelCase` method calls with their `snake_case` equivalents, such as `pluralizer.is_plural('word')`.","cause":"Attempting to use `camelCase` method names (e.g., `isPlural`) after upgrading to `pluralizer` version 2.0.0 or higher.","error":"AttributeError: 'Pluralizer' object has no attribute 'isPlural'"},{"fix":"Instantiate the `Pluralizer` class first: `from pluralizer import Pluralizer; pluralizer_instance = Pluralizer(); pluralizer_instance.pluralize('word')`.","cause":"Trying to call `pluralizer.pluralize()` directly on the imported module instead of an instance of the `Pluralizer` class.","error":"TypeError: pluralize() missing 1 required positional argument: 'self'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.0.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/weixu365/pluralizer-py","docs":null,"changelog":null,"pypi":"https://pypi.org/project/pluralizer/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":[],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}