n_ify: Append '"n"' to indefinite article where indicated

n_ifyR Documentation

Append "n" to indefinite article where indicated

Description

Appends an "n" to the indefinite article "a" if required by English language rules.

Usage

n_ify(x)

Arguments

x

A character vector.

Details

Note that this function only covers part of all cases where "an" instead of "a" is indicated. Since the choice of a or an depends on sound, not spelling, it's not trivial to implement a universal solution.

For example, this function doesn't properly append an "n" to the indefinite article in the following situations:

  • A word starting with the letter "u" where it is pronounced as a vowel, e.g. unhappy. Note that most English words starting with letter "u" are pronounced differently like universum and thus require the indefinite article a, not an.

  • A word starting with a consonant that is pronounced as a vowel, e.g. hour.

Value

A character vector.

See Also

Other spoken language functions: add_definite_article_de(), decline_noun_de(), definite_article_de_declined(), definite_article_de(), prettify_datetime(), prettify_date(), rank_nr(), write_out_n()

Examples

n_ify("This is a absolute disaster, such a error.")

salim-b/salim documentation built on July 9, 2022, 10:53 a.m.