inflection

Good inflection library for PHP?

I'm looking for a good inflection (or well, a library that can turn plural into singular and vice verse - which a kind of inflection) library for PHP, it could be a part of some current framework or a stand alone library the only requirement I have is that it's compatible with the MIT license. ...

How do I spell out an integer in Ruby?

Does anyone know of a Ruby module that will take an integer and spell it out ( 1 => "one", 2 => "two", etc..)? ...

How to turn plural words singular?

I'm preparing some table names for an ORM, and I want to turn plural table names into single entity names. My only problem is finding an algorithm that does it reliably. Here's what I'm doing right now: If a word ends with -ies, I replace the ending with -y If a word ends with -es, I remove this ending. This doesn't always work however...

Inflections seem to not get loaded in test environment of a rails app

I have a model named Aggelia (it's greek for classified ad) and have set an inflection in RAILS_ROOT/config/initializers/inflections.rb like so: ActiveSupport::Inflector.inflections do |inflect| inflect.irregular 'aggelia', 'aggelies' end It works fine in the development environment but when I try to run the tests (only assert truth...

Why does CakePHP use different plural/singular naming conventions?

Can somebody perhaps explain here why on earth CakePHP has a convention of using plural names for db tables and controllers and singular for models? Why not always use singular terms, or always plural? For me it seems confusing to always have to think "now do I use plural or singular here?" (Or is there an easy way to remember??) And th...

JQuery Inflector as fully featured as Rails' ActiveSupport Inflector?

Is there a JQuery plugin with string utils on par with ActiveSupport's Inflector? I have found this Prototype utils port, but it's missing some of them. ...

Programming Language with Inflection

Is there a programming language that uses inflections (suffixing a word to add a certain meaning) instead of operators to express instructions? Just wondering. What I am talking about is using inflections to add a meaning to an identifier such as a variable or type name. For example: native type integer var x : integer = 12 var locati...

grammar in views

I'm displaying a string like "I'm an Actor" or "I'm a skateboarder" and need to use a or an correctly. Is there a nifty rails view helper to see if a word starts with a vowel? <p>I'm an <%= @user.skills %></p> <p>I'm a <%= @user.skills %></p> ...

Cakephp inflection, how to change a plural to a singular.

Hi, I have a controller called "Shops", this is the way the routing system looks for it, however I want to be able to called this controller and what not 'shop'. Is it possible to do this. Cheers! ...

Django+Haystack+Whoosh: how to deal with language inflection

Many languages in Europe are inflectional. This means that one word can be written in multiple forms in text. For example, word 'computer' in polish "komputer" has multiple forms: "komputera", "komputerowi", "komputerem", "komputery" , etc.. How should I use django+haystack+whoosh properly to deal with language inflection? Whenever I...