PHPackages                             bmt/noun-converter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bmt/noun-converter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bmt/noun-converter
==================

A class for converting singular nouns to their plural form or inverse.

v1.0.0(2y ago)0262MITPHP

Since Sep 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/BMTmohammedtaha/noun-converter)[ Packagist](https://packagist.org/packages/bmt/noun-converter)[ RSS](/packages/bmt-noun-converter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (2)

PluralConverter
===============

[](#pluralconverter)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://opensource.org/licenses/MIT)

PluralConverter is a PHP class that provides functionality for converting singular nouns to their plural form. It handles both regular and irregular nouns using a set of predefined rules.

Installation
------------

[](#installation)

You can install the PluralConverter class using Composer. Run the following command in your project directory:

```
composer require bmt/noun-converter

```

Usage
-----

[](#usage)

To use the NounConverter class, first import the namespace:

```
use Bmt\NounConverter\NounConverter;
```

Then, create an instance of the class:

```
$converter = new NounConverter();
```

You can now use the `convertToPlural` method to convert a singular noun to its plural form:

```
$plural = $converter->convertToPlural('dog');
echo $plural; // Outputs "dogs"
```

If the noun is irregular and has a predefined plural form, it will be returned as is:

```
$plural = $converter->convertToPlural('mouse');
echo $plural; // Outputs "mice"
```

Irregular Nouns
---------------

[](#irregular-nouns)

The PluralConverter class includes a list of irregular nouns and their plural forms. You can add more irregular nouns to the `$irregulars` property as needed.

```
private $irregulars = [
    'man' => 'men',
    'woman' => 'women',
    // Add more irregular nouns here
];
```

Pluralization Patterns
----------------------

[](#pluralization-patterns)

The class also uses a set of pluralization patterns and their replacements to convert regular nouns. These patterns are defined in the `$patterns` property.

```
private $patterns = [
    '/(s|ss|sh|ch|x|z)$/i' => '\1es', // Ends with s, ss, sh, ch, x, or z
    '/([^aeiou])y$/i' => '\1ies', // Ends with a consonant + y
    '/(o)$/i' => '\1es', // Ends with o
    '/(f|fe)$/i' => 'ves', // Ends with f or fe
    '/(us)$/i' => 'uses', // Ends with us
    '/(is)$/i' => 'es', // Ends with is
];
```

You can modify or add more patterns to suit your specific needs.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

Contributing
------------

[](#contributing)

Contributions are welcome! If you find a bug or want to add a new feature, please open an issue or submit a pull request.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

953d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/27a34c25ebb1d274100bd85ca3c7a8228b7581b6dd9b73bdffbaa40424ddb44e?d=identicon)[bmt](/maintainers/bmt)

---

Top Contributors

[![BMTmohammedtaha](https://avatars.githubusercontent.com/u/95439605?v=4)](https://github.com/BMTmohammedtaha "BMTmohammedtaha (2 commits)")

### Embed Badge

![Health badge](/badges/bmt-noun-converter/health.svg)

```
[![Health](https://phpackages.com/badges/bmt-noun-converter/health.svg)](https://phpackages.com/packages/bmt-noun-converter)
```

###  Alternatives

[symfony/polyfill-uuid

Symfony polyfill for uuid functions

688335.4M63](/packages/symfony-polyfill-uuid)[spatie/error-solutions

This is my package error-solutions

6853.2M11](/packages/spatie-error-solutions)[phpflo/phpflo

Flow-based programming for PHP

2173.3k4](/packages/phpflo-phpflo)[eftec/autoloadone

AutoloadOne is a program that generates an autoload class for PHP.

403.4k](/packages/eftec-autoloadone)[ys-tools/default-theme-configuration-bundle

OroCommerce Default Theme Configuration Bundle

124.2k](/packages/ys-tools-default-theme-configuration-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
