# doctrine/inflector

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/doctrine-inflector).**

11,349 stars · 134 forks · PHP · mit

## Links

- GitHub: https://github.com/doctrine/inflector
- Homepage: https://www.doctrine-project.org/projects/inflector.html
- awesome-repositories: https://awesome-repositories.com/repository/doctrine-inflector.md

## Description

Inflector is a linguistic data processing library designed to handle string transformations and grammatical inflection within PHP applications. It provides a centralized engine for converting words between singular and plural forms and standardizing text formats to ensure consistency across dynamic content and codebase naming conventions.

The library distinguishes itself through a rule-based inflection engine that utilizes regular expression pattern matching to apply grammatical logic. Developers can extend this functionality using a configurable registry, which allows for the injection or overriding of rules to support internationalized content localization and specific language requirements.

Beyond core inflection, the tool includes a normalization pipeline that processes raw input into URL-safe slugs by removing accents and special characters. It also supports comprehensive string casing transformations, enabling the conversion of text between various programming formats such as camelCase, PascalCase, and snake_case.

## Tags

### Content Management & Publishing

- [Inflection Engines](https://awesome-repositories.com/f/content-management-publishing/authoring-editorial-interfaces/content-authoring-editing/document-authoring-tools/word-counters/inflection-engines.md) — Automates the conversion of words between singular and plural forms to ensure grammatical accuracy. ([source](https://www.doctrine-project.org/projects/doctrine-inflector/en/2.2/index.html))

### Development Tools & Productivity

- [Text String Manipulation Utilities](https://awesome-repositories.com/f/development-tools-productivity/developer-utilities-libraries/programming-logic-libraries/text-string-manipulation-utilities.md) — Normalizes text into URL-safe slugs and applies grammatical rules to dynamic content.

### Programming Languages & Runtimes

- [Data & Text Processing](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-text-processing.md) — Provides a centralized engine for linguistic inflection and text format standardization.
- [String Utilities](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/string-utilities.md) — Converts words between singular and plural forms and transforms string casing for consistent naming.

### Software Engineering & Architecture

- [Pluralization Rules](https://awesome-repositories.com/f/software-engineering-architecture/localization/pluralization-rules.md) — Automates pluralization logic to ensure correct language usage in dynamic application interfaces.
- [Naming Conventions](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/engineering-best-practices/code-craftsmanship-standards/coding-standards/naming-conventions.md) — Enforces consistent naming standards across codebases by transforming variable and class identifiers.
- [Naming Conventions](https://awesome-repositories.com/f/software-engineering-architecture/naming-conventions.md) — Standardizes naming conventions by transforming strings between common programming formats. ([source](https://www.doctrine-project.org/projects/doctrine-inflector/en/2.2/index.html))
- [String Validation and Normalization](https://awesome-repositories.com/f/software-engineering-architecture/string-validation-and-normalization.md) — Sanitizes raw text by removing accents and special characters to produce URL-friendly slugs. ([source](https://www.doctrine-project.org/projects/doctrine-inflector/en/2.2/index.html))
- [Rule Configuration Engines](https://awesome-repositories.com/f/software-engineering-architecture/rule-configuration-engines.md) — Applies prioritized, configurable linguistic rules to determine correct word transformations.
- [Configuration Registries](https://awesome-repositories.com/f/software-engineering-architecture/configuration-registries.md) — Maintains a centralized, prioritized registry for managing and overriding linguistic inflection rules.
- [Content Format Transformers](https://awesome-repositories.com/f/software-engineering-architecture/string-formatting-utilities/content-format-transformers.md) — Transforms text between various programming casing styles like camelCase and snake_case. ([source](https://www.doctrine-project.org/projects/doctrine-inflector/en/2.2/index.html))

### Web Development

- [Slug Generators](https://awesome-repositories.com/f/web-development/url-generators/slug-generators.md) — Generates search-engine-friendly web addresses from raw text strings.
- [Internationalization & Localization](https://awesome-repositories.com/f/web-development/internationalization-localization.md) — Provides inflection logic to ensure accurate and natural text output across different languages.
- [Grammatical Localization Rules](https://awesome-repositories.com/f/web-development/internationalization-localization/translation-management-platforms/site-localization/multi-language-content-delivery/grammatical-localization-rules.md) — Supports internationalized content by allowing language-specific grammatical inflection rules. ([source](https://www.doctrine-project.org/projects/doctrine-inflector/en/2.2/index.html))

### Data & Databases

- [Text Normalization](https://awesome-repositories.com/f/data-databases/text-normalization.md) — Normalizes user input by removing special characters and accents for clean data storage.
