jpvanhal / inflection

A port of Ruby on Rails' inflector to Python
https://inflection.readthedocs.io
MIT License
495 stars 62 forks source link

[Feature request] `indefinitize` to get the correct indefinite article? #64

Open redsun82 opened 2 years ago

redsun82 commented 2 years ago

It would be nice to have a indefinitize function to add the correct indefinite article:

indefinitize("child") == "a child"
indefinitize("element") == "an element"
indefinitize("universe") == "a universe"
indefinitize("undisclosed recipient") == "an undisclosed recipient"

The rules only gets a bit more complicated when dealing with "u" as first letter.