The indefinite article "an" is used when the following word starts with a vowel sound. For example one write "an adjective" but "a noun".
However, when an abbreviation is used, should this be based on the expanded meaning, or on the letters of the abbreviation.
Specifically, one writes "a noun phrase". However, here on ell.se, the abbreviation "NP" for 'noun phrase" is commonly used. If this were pronounced by sounding out its letters, as "En-Pee" it would call for "an". If it were read as "noun phrase" it would call for "a". Should one write "a NP" or "an NP" here on ELL?
I incline to "a NP" and i used that in an answer just a few minutes ago, but I am not at all sure.