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
See also this answer, which recommends using Morpha (or studying the algorithm behind it).
If you know that the words that you want to lemmatize are plural nouns then you can tag them with NNS to get a more accurate output.
Input example:
$ cat test.txt
Types_NNS
Pies_NNS
Trees_NNS
Buses_NNS
Radii_NNS
Communities_NNS
Sheep_NNS
Fish_NNS
Output example:
$ cat test.txt | ./morpha -c
Type
Pie
Tree
Bus
Radius
Community
Sheep
Fish