TL;DR

  • ~/Library/Keyboard/VulgarWordUsage.db is real. It records which swear words you use, **per app and per

    recipient**, so autocorrect learns to stop "ducking" you. On my Mac it is empty, and typing swear words into a native app did not fill it.

  • The interesting part is upstream. Apple's system dictionary flags every word with one of three tiers (vulgar,

    offensive, sensitive) and up to eleven topic flags (sex, drugs, religion, politics, violence, …).

  • There is no public API for any of it. I read the flags with a few private C functions from Lexicon.framework.

    Code below, in C and in Swift. The full dumps for 15 languages are in this gist (uncensored, so mind the content warning).

  • Highlights: Oedipus is vulgar. Tom and Mick are offensive. pee, poo, niggle and underling are

    sensitive. And "Trump" is the only living politician in the English sensitive tier, next to Hitler, Mao, Osama bin Laden and the Taliban. Biden, Obama and Putin are clean.