Open avin-kavish opened 2 years ago
@avin-kavish I think you can create your own. you have check if the first letter of a value passed starts with a vowel. but there are possibilites that a value starts a vowel but uses an "a" article.
eg. a university
and you should store them in a "library".
like what the author did to irregular rules and uncountable rules.
I know. I'm looking for a maintained library, or one I can fork. Do you have an (ideally exhaustive) reference of those exceptional cases?
Might be worth starting with something like https://www.npmjs.com/package/@informath/text-to-ipa and then checking to see if the first sound is a vowel sound or not? Just noting that this is dialect specific, e.g. "an herb" (American English) vs "a herb" (Australian English) so it's not something you can derive from the written text alone.
@avin-kavish Check out this library: https://www.npmjs.com/package/indefinite
Is there a similar library for chosing between
a
andan
given a word?