Buğra Gedik
Buğra Gedik

Reputation: 724

Singularization function for English words in bash

Any pointers to a bash function that performs singularization on English words? It does not need to be perfect.

Upvotes: 3

Views: 166

Answers (2)

Kaarel
Kaarel

Reputation: 10672

If you need to cover both nouns and verbs, and/or the imperfect solutions turn out to be too imperfect then forget Bash and look into tools for morphological analysis and disambiguation.

Upvotes: 0

Michael Krelin - hacker
Michael Krelin - hacker

Reputation: 143229

Imperfect one would be ${word%s}.

Upvotes: 3

Related Questions