承接 thru.io/inflection 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thru.io/inflection

最新稳定版本:v1.0

Composer 安装命令:

composer require thru.io/inflection

包简介

A library to allow for pluralisation and singularisation of words programatically.

README 文档

README

Originally built from source long-lost to the mists of time, only closest reference I can find is here: http://fossies.org/linux/Neos/Packages/Framework/TYPO3.Kickstart/Resources/Private/PHP/Sho_Inflect.php

Original Readme below:

Thanks to http://www.eval.ca/articles/php-pluralize (MIT license) http://dev.rubyonrails.org/browser/trunk/activesupport/lib/active_support/inflections.rb (MIT license) http://www.fortunecity.com/bally/durrus/153/gramch13.html http://www2.gsu.edu/~wwwesl/egw/crump.htm // Changes (12/17/07) Major changes

Fixed irregular noun algorithm to use regular expressions just like the original Ruby source. (this allows for things like fireman -> firemen Fixed the order of the singular array, which was backwards. // Minor changes

Removed incorrect pluralization rule for /([^aeiouy]|qu)ies$/ => $1y Expanded on the list of exceptions for *o -> *oes, and removed rule for buffalo -> buffaloes Removed dangerous singularization rule for /([^f])ves$/ => $1fe Added more specific rules for singularizing lives, wives, knives, sheaves, loaves, and leaves and thieves Added exception to /(us)es$/ => $1 rule for houses => house and blouses => blouse Added excpetions for feet, geese and teeth Added rule for deer -> deer Changes: Removed rule for virus -> viri Added rule for potato -> potatoes Added rule for *us -> *uses

统计信息

  • 总下载量: 2.11k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-12-03