Skip to content

Indefinite article a/an inconsistently false-positive'd when followed by all-caps dictionary word #3921

Description

@jbt

What got flagged?

a FREE event

Harper wants to change "a" to "an"

Why is this incorrect?

"FREE" in this instance is just a word uppercased for emphasis. Harper is treating it like an initialism and then going "ah well F has a 'eff' sound so that should get 'an'"

I dug into this a little more and it looks like the likely-acronym check is incredibly crude - it picks up FREE as not an acronym specifically because it's at least 3 letters and doesn't start with a consonant immediately followed by a vowel (as opposed to, say, "NEW" which doesn't trigger the same false-positive)

I'm fairly new to Harper so apologies if this is a stupid suggestion but - instead of the acronym check just looking at the vowel-ness of the first two characters, would it not make sense to check if it's a fully-uppercased dictionary word, and if so, assume acronym rather than initialism?

Just based on my own gut feel, I suspect that any all-caps dictionary word that's more than a few letters long, is far more likely to be pronounced as a word rather than as an initialism even if it is an abbreviation (the example that immediately came to mind was "James Bond deals with a SPECTRE agent" - Harper currently flags the "a" here)

Possibly related issue: #534 which also seems to be related to acronyms/initialisms and a/an (although that one seems to be more about a far more ambiguous case, not sure if it overlaps)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfalse-positiveCorrect text flagged as an error by mistakeharper-coreRelated to the core grammar checking enginelintingRelated to lint rules and linter execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions