Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Similar library but for articles #195

Open
avin-kavish opened this issue Jun 26, 2022 · 4 comments
Open

Similar library but for articles #195

avin-kavish opened this issue Jun 26, 2022 · 4 comments

Comments

@avin-kavish
Copy link

Is there a similar library for chosing between a and an given a word?

@ronssij
Copy link

ronssij commented Jul 6, 2022

@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.

@avin-kavish
Copy link
Author

avin-kavish commented Jul 6, 2022

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?

@matthewberryman
Copy link

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.

@kennydifiore
Copy link

@avin-kavish Check out this library: https://www.npmjs.com/package/indefinite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants