-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Incorrect indefinite article "an" returned when handling uncommon abbreviations #136
Labels
Comments
Seems reasonable. Can you supply a patch? |
I've added tonywu7's modification on https://github.com/kimgerdes/inflect (the smallest fork of all times, just a little ^) |
@kimgerdes is it okay if I use your fork, and does it have the same license as this repo? I am running into the same issue. Thank you! |
sure thing. same license :) |
jaraco
added a commit
that referenced
this issue
Apr 6, 2023
jaraco
added a commit
that referenced
this issue
Apr 6, 2023
Merged
Merged
Fixed in 6.0.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
inflect==5.3.0
python==3.9.6
Problem
inflect.engine.a()
returns the article "an" instead of "a" for some abbreviations that do not begin with vowel phonemes. Observe:Seems to be caused by the
A_abbrev
regex:inflect/inflect.py
Lines 1806 to 1813 in 98e19e3
which is missing the
^
start-of-line assertion, and so it matches parts of the abbreviations that would otherwise require "an," even thought they are not at the beginning of the word:After fixing it:
The text was updated successfully, but these errors were encountered: