# Titles and honorifics to strip from names.
# Extracted from python-nameparser (MIT license) and supplemented.
# All entries are lowercase for case-insensitive matching.

PREFIXES: set[str] = {
    # General honorifics
    "mr", "mrs", "ms", "miss", "mx", "mstr", "master",
    "madam", "madame", "mme", "mlle",
    # Professional / academic
    "dr", "prof", "professor", "doc",
    "phd",  # sometimes used as prefix
    # Religious
    "rev", "reverend", "pastor", "father", "fr",
    "mother", "sister", "sr", "brother", "br",
    "archbishop", "bishop", "cardinal", "deacon",
    "elder", "monsignor", "msgr", "pope",
    "rabbi", "imam", "ayatollah", "swami",
    "most reverend", "very reverend", "right reverend",
    # Military
    "pvt", "private",
    "pfc",
    "cpl", "corporal",
    "spc", "specialist",
    "sgt", "sergeant",
    "ssgt", "staff sergeant",
    "sfc", "sergeant first class",
    "msg", "master sergeant",
    "1sgt", "first sergeant",
    "sgm", "sergeant major",
    "csm", "command sergeant major",
    "sma", "sergeant major of the army",
    "wo1", "wo2", "wo3", "wo4", "wo5",
    "cwo2", "cwo3", "cwo4", "cwo5",
    "ens", "ensign",
    "2lt", "2nd lt", "second lieutenant",
    "1lt", "1st lt", "first lieutenant",
    "lt", "lieutenant",
    "ltjg", "lieutenant junior grade",
    "capt", "captain", "cpt",
    "maj", "major",
    "ltc", "lieutenant colonel",
    "col", "colonel",
    "bg", "brigadier general",
    "bgen",
    "mg", "major general",
    "mgen",
    "ltg", "lieutenant general",
    "lgen",
    "gen", "general",
    "ga", "general of the army",
    "adm", "admiral",
    "radm", "rear admiral",
    "vadm", "vice admiral",
    "fadm", "fleet admiral",
    "cdr", "commander",
    "lcdr", "lieutenant commander",
    "cmdr",
    "mcpo", "master chief petty officer",
    "scpo", "senior chief petty officer",
    "cpo", "chief petty officer",
    "po1", "po2", "po3",
    "sn", "seaman",
    "sa", "seaman apprentice",
    "sr", "seaman recruit",
    "cmsgt", "chief master sergeant",
    "smsgt", "senior master sergeant",
    "msgt",
    "tsgt", "technical sergeant",
    "ssgt",
    "a1c", "airman first class",
    "amn", "airman",
    "ab", "airman basic",
    # Nobility / royalty
    "sir", "dame", "lady", "lord",
    "baron", "baroness", "baronet",
    "count", "countess", "earl",
    "duke", "duchess",
    "king", "queen", "prince", "princess",
    "viscount", "viscountess",
    "marquis", "marquess", "marchioness",
    "archduke", "archduchess",
    "emperor", "empress",
    "grand duke", "grand duchess",
    "elector",
    # Political / governmental
    "pres", "president",
    "vp", "vice president",
    "gov", "governor",
    "senator", "sen",
    "rep", "representative",
    "congressman", "congresswoman",
    "secretary", "sec",
    "ambassador", "amb",
    "mayor",
    "chancellor",
    "premier",
    "minister", "prime minister",
    "alderman", "alderwoman",
    "councillor", "councilman", "councilwoman",
    "delegate",
    "commissioner",
    "assemblyman", "assemblywoman",
    "selectman",
    "treasurer",
    "comptroller",
    "attorney general",
    # Legal / judicial
    "judge", "justice",
    "chief justice",
    "magistrate",
    "hon", "honorable", "honourable",
    "the honorable", "the honourable",
    "the hon",
    # Other
    "coach",
    "ofc", "officer",
    "chief",
    "supt", "superintendent",
    "det", "detective",
    "insp", "inspector",
    "cmdr",
    "sheriff",
    "marshal",
    "warden",
    "constable",
    "ranger",
    "trooper",
}
