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

wrong inflect.a: "an BLT" #180

Closed
bancron opened this issue Mar 15, 2023 · 1 comment
Closed

wrong inflect.a: "an BLT" #180

bancron opened this issue Mar 15, 2023 · 1 comment

Comments

@bancron
Copy link

bancron commented Mar 15, 2023

There is a bug with certain strings of capital letters appearing in words that results in bad results from a(). For example it should be "a Spicy BLT Sauce", not "an Spicy BLT Sauce".

This appears to have to do with

A_abbrev = re.compile(
    r"""
(?! FJO | [HLMNS]Y.  | RY[EO] | SQU
  | ( F[LR]? | [HL] | MN? | N | RH? | S[CHKLMNPTVW]? | X(YL)?) [AEIOU])
[FHLMNRSX][A-Z]
""",
    re.VERBOSE,
)

matching the "LT" part. It seems to me that the regex should be anchored (^...) or in some fashion not match random "LT" in the middle of words.

I would really appreciate it if you could fix this bug. Thank you!

@bancron
Copy link
Author

bancron commented Mar 15, 2023

Duplicate of #136.

@jaraco jaraco closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants