jaraco / inflect

Correctly generate plurals, ordinals, indefinite articles; convert numbers to words
https://pypi.org/project/inflect
MIT License
957 stars 107 forks source link

"Guppy" -> "Guppys" instead of "Guppies" and others #206

Closed Gheed0123 closed 5 months ago

Gheed0123 commented 6 months ago

inflect.engine().plural_noun("Guppy") returns "Guppys" inflect.engine().plural_noun("guppy") returns "guppies"

I manually fixed by removing capital letter at start: ''.join([txt[:1].lower(),txt[1:]])

and readding later with ''.join([txt[:1].upper(),txt[1:]]) string.capitalize() and string.lower() dont work in some cases

There might be another way, but I didnt bother looking

jaraco commented 5 months ago

This looks like a duplicate of #201.