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. He
I think you have to use a list to translate plural into singular for some special words (in your example Types->Type).
I think you could have a look at the sourcecode of CakePHP (you might start your search here). They are using such an algorithm for their tablenames and fieldnames to automagically join tables.
[Edit:] Here you have some scientific work to read about "Plural inflection in English"