solventt/pluralizer

将名词从单数转换为复数

dev-master 2024-01-16 15:47 UTC

README

此包将名词从单数转换为复数。还支持

  • 286 个不可数名词,它们具有相同的单数和复数形式
  • 如“man - men”、“tooth - teeth”等。
  • 相同的名词形式(sheep, swine, deer, 等)

不支持复合名词(例如 head banger, son-in-law, 等)

语法规则来源之一 - https://en.wikipedia.org/wiki/English_plurals

如果有人对以-o结尾的名词表示怀疑,可以在https://www.wordexample.com/list/nouns-ending-o上找到链接到 wiktionary.org

安装

composer require solventt/pluralizer

用法

$plural = Pluralizer::convert('singular');