{"article":{"slug":"i-dumped-apples-fucking-word-list","title":"I Dumped Apple's Fucking Word List","subtitle":null,"summary":"Helge Sverre digs into macOS's VulgarWordUsage.db and the system dictionary's hidden vulgar, offensive and sensitive tiers and topic flags, reads them via private Lexicon.framework functions with C and Swift code, and dumps the lists for 15 languages, with some surprising entries.","content_type":"blog_post","language":"en","canonical_url":"https://helgesver.re/articles/macos-vulgar-word-flags","author":{"name":"Helge Sverre","url":null,"person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Helge Sverre","url":null,"listing_slug":null,"listing":null},"topics":[{"name":"macos","slug":"macos","url":"https://listedarticles.com/topics/macos"},{"name":"privacy","slug":"privacy","url":"https://listedarticles.com/topics/privacy"},{"name":"programming","slug":"programming","url":"https://listedarticles.com/topics/programming"},{"name":"culture","slug":"culture","url":"https://listedarticles.com/topics/culture"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":3219,"reading_minutes":14,"published_at":"2026-11-03T00:00:00.000Z","added_at":"2026-11-04T02:14:10.529Z","updated_at":"2026-11-04T02:14:10.529Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/i-dumped-apples-fucking-word-list","markdown_url":"https://listedarticles.com/articles/i-dumped-apples-fucking-word-list.md","example":false,"citation":"Helge Sverre, Helge Sverre. \"I Dumped Apple's Fucking Word List.\" 3 Nov 2026. https://helgesver.re/articles/macos-vulgar-word-flags (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://helgesver.re/articles/macos-vulgar-word-flags"},"body_markdown":"## TL;DR\n\n- `~/Library/Keyboard/VulgarWordUsage.db` is real. It records which swear words you use, **per app and per\n  recipient**, so autocorrect learns to stop \"ducking\" you. On my Mac it is empty, and typing swear words into a native\n  app did not fill it.\n- The interesting part is upstream. Apple's system dictionary flags every word with one of three tiers (**vulgar**,\n  **offensive**, **sensitive**) and up to eleven topic flags (sex, drugs, religion, politics, violence, …).\n- There is no public API for any of it. I read the flags with a few private C functions from `Lexicon.framework`.\n  Code below, in C and in Swift. The full dumps for 15 languages are in\n  [this gist](https://gist.github.com/HelgeSverre/25d9e54a09533e84ada32c2bc26e560c) (uncensored, so mind the content\n  warning).\n- Highlights: *Oedipus* is vulgar. *Tom* and *Mick* are offensive. *pee*, *poo*, *niggle* and *underling* are\n  sensitive. And **\"Trump\" is the only living politician in the English sensitive tier**, next to Hitler, Mao, Osama\n  bin Laden and the Taliban. Biden, Obama and Putin are clean.\n\n**Content note:** this article prints the words uncensored, slurs included, because the whole point is to see what\nApple flags. The one exception is the n-word: it is in the list in English and several other languages, and I'm not\nwriting it out.\n\n## It started with a tweet\n\n![Tweet by Nick (@nicksdot): 'TIL: macOS has a database to track our use of profanity', showing a Finder listing with user_model_database.sqlite-wal and VulgarWordUsage.db. Helge replies 'Where is it located?' and Nick answers '~/Library/Keyboard/VulgarWordUsage.db'.](https://helgesver.re/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvulgar-word-usage-tweet.289c366e.webp&w=1200&q=75)\n\n[Nick posted this](https://x.com/nicksdot/status/2117656390428967014), I asked where it lives, and he answered. A\ndatabase that tracks my profanity is not something I can leave alone, so I opened mine.\n\n## The database\n\n```\n$ sqlite3 -readonly ~/Library/Keyboard/VulgarWordUsage.db .schema\nCREATE TABLE properties (ROWID INTEGER PRIMARY KEY, key, value, UNIQUE (key));\nCREATE TABLE IF NOT EXISTS \"vword_usage\" (\n    ROWID INTEGER PRIMARY KEY AUTOINCREMENT,\n    app                          TEXT, -- app identifier\n    recipient                    TEXT, -- recipient identifier\n    vword                        TEXT, -- vulgar word\n    word_reading                 TEXT, -- the reading form of a word (relevant for Japanese)\n    usage_count                  INTEGER DEFAULT 0,\n    last_use_timestamp           REAL DEFAULT 0, -- last use timestamp (seconds since the reference date)\n    journaled\n);\nCREATE UNIQUE INDEX app_recipient_vword_word_reading_idx ON vword_usage(app, recipient, vword, word_reading);\n```\n\nSo the keyboard can know that you say *fuck* in Messages to one particular friend, but not in Mail to your boss. The\nunique index is on `(app, recipient, word, reading)`, so that is the granularity.\n\nMine has zero rows. The `properties` table holds `version = 2` and nothing else. The file was last written in April\n2024.\n\n### What it is for\n\nAt WWDC in June 2023, Craig Federighi announced the iOS 17 autocorrect rewrite with this line:\n*\"In those moments where you just want to type a ducking word, well, the keyboard will learn it, too.\"*\n([TechCrunch](https://techcrunch.com/2023/06/05/thanks-to-ai-ios-17-will-learn-your-swears/),\n[NPR](https://www.npr.org/2023/06/07/1180791069/apple-autocorrect-ducking))\n\nThis database is how it learns. The symbol names in the macOS shared library cache spell out the flow:\n\n```\nTI::VulgarWordUsageDatabaseWrapper::set_current_app_id(CFString)\nTI::VulgarWordUsageDatabaseWrapper::set_current_recipient_ids(vector<string>)\nTI::VulgarWordUsageDatabaseWrapper::increment_usage_count(word, reading, recipients)\nTI::VulgarWordUsageDatabaseWrapper::decrement_usage_count(...)\nTI::VulgarWordUsageDatabaseWrapper::can_autocorrect(word, app, recipients)\nTI::VulgarWordUsageDatabaseWrapper::can_autocorrect_somewhere(word, reading)\nKB::FilterNonVulgarIfTopCandidateVulgar::filter_candidates(...)\nKB::Candidate::every_vulgar_word_is_allowlisted(VulgarWordUsageDatabaseWrapper*, ...)\n```\n\nPlus log strings like `Passing recipient IDs to the vulgar word usage database wrapper; number of IDs: %lu`.\n\nIn plain terms:\n\n1. When you start typing, the keyboard engine tells the wrapper which app you're in and who you're writing to.\n2. When you type a vulgar word and keep it, its count goes up for that app and those recipients. Undoing the word\n   brings the count back down.\n3. When the engine ranks suggestions, it asks whether every vulgar word in a candidate is allowlisted for this\n   context. If it isn't, the clean alternative wins: *ducking*.\n\nA `_KSUserWordsSynchroniser sharedAcrossLanguagesVulgarWordUsageValue` symbol suggests it syncs between devices like\nyour other learned words.\n\n### Mine is empty\n\nI tried to fill it. Using [agent-desktop](https://github.com/vercel-labs/agent-desktop), I opened a new TextEdit document\nand typed `well fuck this shit, damn it.`, first as a text insert, then as individual key presses. Nothing changed: no\nrow, no log line, and the file's modification date stayed in 2024.\n\nI don't know why, and I couldn't work it out. Maybe the Mac never records anything here, or maybe it only does so in\nsome apps or settings. If you've got rows in yours, tell me what you did.\n\nThat would be a short article. But the database only counts words that are *already* known to be vulgar. So who decides\nthat?\n\n## Where the word list lives\n\nSearching the dyld shared cache for \"vulgar\" turned up a C API with an `LX` prefix\n(`LXVulgarWordUsageDatabaseCreate`, `LXVulgarWordUsageDatabaseCanAutocorrect`, …) and, more usefully, two functions on\ndictionary entries:\n\n```\n_LXEntryGetCategoryFlags\n_LXEntryGetMetaFlags\n```\n\n`LX` is `Lexicon.framework`, a private framework that reads the per-language dictionaries under\n`/System/Library/LinguisticData/`. Every word in those dictionaries is an `LXEntry` with two 32-bit flag fields. If the\nvulgarity rating is anywhere, it's in those bits.\n\n## There is no public API\n\nI looked. `NSSpellChecker`, `UITextChecker`, `NaturalLanguage` and `UILexicon` don't expose vulgarity.\n`SensitiveContentAnalysis` covers images and video, not text. The only places \"profanity\" shows up on\ndeveloper.apple.com are App Store age ratings and review guidelines.\n\nSo: private functions. Lexicon has no headers, but the C functions are exported, and their signatures are easy to\nguess because they follow CoreFoundation conventions. This program opens the dictionary for a locale, walks every entry,\nand prints both flag fields:\n\n```\n// lx.c — dump every word in a system lexicon with its flags.\n// clang -O1 -o lx lx.c -F/System/Library/PrivateFrameworks -framework Lexicon -framework CoreFoundation\n#include <CoreFoundation/CoreFoundation.h>\n#include <stdbool.h>\n#include <stdio.h>\n\ntypedef const void *LXLexiconRef, *LXCursorRef, *LXEntryRef;\nextern CFStringRef kLXLexiconLocaleKey;\nLXLexiconRef LXLexiconCreate(CFDictionaryRef options, CFErrorRef *error);\nLXCursorRef  LXLexiconCreateRootCursor(LXLexiconRef);\nvoid         LXCursorEnumerateEntriesRecursively(LXCursorRef, void (^)(LXEntryRef, bool *stop));\nCFStringRef  LXEntryCopyString(LXEntryRef);\nuint32_t     LXEntryGetCategoryFlags(LXEntryRef);\nuint32_t     LXEntryGetMetaFlags(LXEntryRef);\n\nint main(int argc, char **argv) {\n  CFStringRef locale = CFStringCreateWithCString(NULL, argc > 1 ? argv[1] : \"en_US\", kCFStringEncodingUTF8);\n  const void *keys[] = {kLXLexiconLocaleKey}, *values[] = {locale};\n  CFDictionaryRef options = CFDictionaryCreate(NULL, keys, values, 1, &kCFTypeDictionaryKeyCallBacks,\n                                               &kCFTypeDictionaryValueCallBacks);\n  LXLexiconRef lexicon = LXLexiconCreate(options, NULL);\n  if (!lexicon) return 1;\n\n  LXCursorEnumerateEntriesRecursively(LXLexiconCreateRootCursor(lexicon), ^(LXEntryRef entry, bool *stop) {\n    char word[512] = \"\";\n    CFStringRef s = LXEntryCopyString(entry);\n    if (s) { CFStringGetCString(s, word, sizeof word, kCFStringEncodingUTF8); CFRelease(s); }\n    printf(\"%08x\\t%08x\\t%s\\n\", LXEntryGetCategoryFlags(entry), LXEntryGetMetaFlags(entry), word);\n  });\n}\n```\n\n```\n$ ./lx en_US | wc -l\n  199019\n$ ./lx en_US | awk -F'\\t' '$3 == \"fuck\" || $3 == \"table\" || $3 == \"Trump\"'\n00000000\t00800002\tfuck\n00000000\t00000000\ttable\n00002000\t02000081\tTrump\n```\n\nThe same thing in Swift, loading the functions at runtime with `dlopen` and `dlsym` so you don't need to link against\na private framework. It prints only words that carry one of the three tiers:\n\n```\n// lexflags.swift — swiftc -O lexflags.swift -o lexflags && ./lexflags en_US\nimport Foundation\n\nlet lexicon = dlopen(\"/System/Library/PrivateFrameworks/Lexicon.framework/Lexicon\", RTLD_NOW)!\nfunc sym<T>(_ name: String, as _: T.Type) -> T { unsafeBitCast(dlsym(lexicon, name)!, to: T.self) }\n\ntypealias LXRef = UnsafeRawPointer\nlet create     = sym(\"LXLexiconCreate\", as: (@convention(c) (CFDictionary, UnsafeMutablePointer<Unmanaged<CFError>?>?) -> LXRef?).self)\nlet rootCursor = sym(\"LXLexiconCreateRootCursor\", as: (@convention(c) (LXRef) -> LXRef?).self)\nlet enumerate  = sym(\"LXCursorEnumerateEntriesRecursively\", as: (@convention(c) (LXRef, @convention(block) (LXRef, UnsafeMutablePointer<Bool>) -> Void) -> Void).self)\nlet copyString = sym(\"LXEntryCopyString\", as: (@convention(c) (LXRef) -> Unmanaged<CFString>?).self)\nlet metaFlags  = sym(\"LXEntryGetMetaFlags\", as: (@convention(c) (LXRef) -> UInt32).self)\nlet category   = sym(\"LXEntryGetCategoryFlags\", as: (@convention(c) (LXRef) -> UInt32).self)\nlet localeKey  = dlsym(lexicon, \"kLXLexiconLocaleKey\")!.load(as: CFString.self)\n\nlet locale = CommandLine.arguments.dropFirst().first ?? \"en_US\"\nguard let lex = create([localeKey: locale] as CFDictionary, nil), let root = rootCursor(lex) else {\n    fatalError(\"could not open lexicon for \\(locale)\")\n}\n\nlet tiers: [(UInt32, String)] = [(0x0080_0000, \"vulgar\"), (0x0100_0000, \"offensive\"), (0x0200_0000, \"sensitive\")]\nenumerate(root) { entry, _ in\n    let meta = metaFlags(entry)\n    guard let tier = tiers.first(where: { meta & $0.0 != 0 })?.1,\n          let word = copyString(entry)?.takeRetainedValue() else { return }\n    print(tier, String(format: \"%05x\", category(entry)), word, separator: \"\\t\")\n}\n```\n\nBoth are read-only. They open the same dictionary the keyboard uses and print it.\n\n## Decoding the bits\n\nApple doesn't document these flags, so every meaning below is inferred: I grouped words by bit and read samples until\neach group's theme was obvious. The system code helps with one of them. An enum case called\n`offensiveVulgarSensitive` sits right next to the vulgar-word code, and three adjacent meta bits match it.\n\n### The three tiers (meta flags)\n\n| Bit | Tier | en\\_US words | Examples |\n| --- | --- | --- | --- |\n| `0x00800000` | vulgar | 1,050 | fuck, shit, cunt, cock, crap, wtf, fml, bullshitting, fucktard, shizzle, merde |\n| `0x01000000` | offensive | 663 | kike, wop, dago, fag, Paki, japs, Klansman, retard, Oriental, ass, asshole |\n| `0x02000000` | sensitive | 2,558 | damn, bitch, idiot, LSD, abortion, gun, suicide, anus, pee, poo |\n\nIn en\\_US a word has at most one tier: they never overlap. Out of 199,019 entries, 4,271 have one.\n\nRoughly: **vulgar** is swearing and sex slang, **offensive** is slurs aimed at groups of people, and **sensitive** is\neverything a keyboard shouldn't offer you unprompted: mild swears, insults, drugs, weapons, extremism, disease and\nbodily functions.\n\n### The topics (category flags)\n\nThe other field is a topic bitmask, and a word can have several topics:\n\n| Bit | Topic | en\\_US words | Examples |\n| --- | --- | --- | --- |\n| `0x00100` | excretion | 123 | feces, barf, crapper, piddle, pooped |\n| `0x00200` | body parts | 958 | nipples, navel, buttock, perineum, triceps |\n| `0x00400` | insults, identity-loaded | 823 | idiot, cretin, hick, pleb, sexist, homophobic, blacklist |\n| `0x00800` | disease | 93 | Covid, herpes, PTSD, leprosy, monkeypox |\n| `0x01000` | drugs | 222 | heroin, shroom, crackhead, hotbox, OD |\n| `0x02000` | politics, extremism | 266 | Hamas, Goebbels, Leninism, democrat, swastikas, Trump |\n| `0x04000` | religion, damnation | 420 | Sikhism, jihadi, Beelzebub, damn, hell, jeez |\n| `0x08000` | sex | 473 | nude, nookie, lecher, harlots, Pornhub, Hooters |\n| `0x10000` | violence, death | 373 | suicide, lynch, murders, hangings, slave, slaveholder |\n| `0x20000` | weapons, terrorism | 268 | AK-47, grenadier, jihad, sarin, kamikaze, yellowcake |\n| `0x40000` | catch-all \"sensitive context\" | 1,080 | God, Allah, Jews, gay, trans, bi, crazy, fat, ugly, sex, die |\n\nThe topic flags and the tiers are independent. 2,052 English words have a topic but no tier: *gay*, *fat*, *God*,\n*Allah* and *sex* are all tagged \"sensitive context\" but are not vulgar, offensive or sensitive. My guess is the topic\nis a hint (\"be careful how you rank this\") and the tier is the rule.\n\nThe lower meta bits are dull: proper nouns, abbreviations, camel-case brand names like *iMac* and *tvOS*. Nothing to see\nthere.\n\n## The weird ones\n\nThis is where it gets fun. Some flags are obviously right, and some made me laugh.\n\n### Vulgar\n\n- **Oedipus**: vulgar. Presumably because of *motherfucker*-adjacent jokes, or the complex. Sophocles would be thrilled.\n- **reams**: vulgar. As in \"to ream someone\".\n- **cooties**: vulgar. Your nine-year-old is swearing.\n- **orgy**, **sext**, **merde**: fair enough.\n\n### Offensive\n\n- **Tom** and **Mick**: offensive. *Uncle Tom* and the slur for Irish people, but also very common first names.\n- **Oriental**: offensive.\n- **papooses**: offensive.\n- **conservatards**: offensive, the one political insult I found in the slur tier.\n- **niggardly**: offensive. It means \"stingy\" and comes from Old Norse, unrelated to the slur. It has also caused\n  [real controversies](https://en.wikipedia.org/wiki/Controversies_about_the_word_niggardly), which is presumably why\n  it's there.\n- **ass** and **asshole**: offensive, not vulgar.\n\n### Sensitive\n\n- **pee** and **poo**: sensitive, with the excretion topic. So are *premenstrual*, *leprosy* and *herpesvirus*.\n- **niggle** (a small worry, of Scandinavian origin) and **underling** (Old English for a subordinate) are sensitive and\n  share the insult topic. Similar words aren't flagged: *snigger* is clean but *niggle* is flagged, and *minion*,\n  *lackey*, *flunky* and *stooge* are clean but *underling* is flagged. These look like hand-picked entries, not rules.\n- **blacklist** and **whitelist** are sensitive with the insult/identity topic. That matches the industry move to\n  *blocklist* and *allowlist*. Apple's own phrase-filter files are named `blocklist.dat`.\n- **Braves** and **Chiefs** (team names with Native American mascots), **Londonderry** (the contested name for Derry),\n  **Gentile**, **Jehovah**, **Mongol** and **Frenchier** are all sensitive.\n- **Isis** is sensitive with the politics topic. Sorry to the Egyptian goddess.\n- **slave**, **slavery** and **slaveholder** are sensitive with the violence topic.\n- **idiot** is sensitive in English. Norwegian is stricter and puts *idiot* in the offensive tier.\n\n## The Trump flag\n\nThe sensitive tier has 109 capitalized words. Here is all of it:\n\n> Al-Qaeda, Al-Qaida, Aryan, Aryans, Auschwitz, Bacchus, Beelzebub, Birkenau, Brave(s), Buchenwald, Chief(s),\n> Chippendale(s), Christ-y, Christer(s), Crip(s), Dachau, Eichmann, Frenchier, Gentile(s), Gestapo(s), Goebbels,\n> Goering, Hamas, Hezbollah, Himmler, Hitler, Hitlerian, Hitlerism, Hitlerite(s), Hitlerjugend, Hooters, Isis,\n> Islamophobe(s), Islamophobic, Jehovah(s), Jewfro(s), Jezebel(s), Kalashnikov(s), Kristallnacht, Kuomintang,\n> Londonderry, Luftwaffe, Mao, Mauthausen, Mickie(s), Mollie(s), Mongol(s), Mossad, Nazi(s), Nazism, Osama, Pornhub,\n> Quaalude(s), Reich, Reichsmark, Reichstag, Sachsenhausen, Satan, Satanism, Shoah, Sinophobe(s), Sinophobic, Sodom,\n> Stasi, Taliban, Treblinka, **Trump, Trumps**, Unabomber, Uzi(s)\n\n(Plurals and possessives folded for brevity.)\n\nEvery other real person on that list is dead, and nearly all of them are Nazi officials, dictators or terrorists.\nThen there's Trump:\n\n```\ncategory  meta      word\n00002000  02000081  Trump        sensitive tier + politics topic\n00002000  02000081  Trumps\n00002000  02000081  Trump's\n00000000  00000000  trump        (the card-game word: clean)\n00000000  00000000  trumped\n```\n\nFor comparison:\n\n| Word | en\\_US |\n| --- | --- |\n| Trump | sensitive, politics topic |\n| Hitler | sensitive, politics topic |\n| Biden | clean |\n| Obama | clean |\n| Putin | clean |\n| Stalin | clean |\n| Musk | not in the dictionary |\n\n`en_GB` matches `en_US`. Other languages differ: the German dictionary has *Trump* clean (and puts *Hitler* in the\n**offensive** tier), and Swedish is the one that flags *Putin* as sensitive.\n\nWhat the flag *does* matters here. As far as I can tell, a sensitive word is one the keyboard shouldn't suggest on its\nown. You can still type it and it won't be corrected away. Think \"keep this out of the QuickType bar unless the user is\nclearly heading there\", which is a lot milder than a ban.\n\nThere is a plausible reason Apple would want that for one specific name. In February 2025, iPhone dictation briefly\nshowed \"Trump\" when people said \"racist\". It went viral, and Apple called it a\n\"[phonetic overlap](https://www.nbcnews.com/tech/apple-glitch-voice-to-text-trump-rcna193733)\" in the speech model and\nshipped a fix within a day\n([9to5Mac](https://9to5mac.com/2025/02/25/iphone-trump-siri-racist-bug/)). The dictionary files on my Mac are from\nJuly 2025. A rule that keeps the name out of unprompted suggestions would stop that kind of thing from happening\nagain through the keyboard. I can't prove that's why it's there, and I don't have an older dictionary to compare\nagainst. But it fits.\n\n### Norwegian politics, for comparison\n\nBecause I'm Norwegian and had to check:\n\n| Word | Topic | Tier |\n| --- | --- | --- |\n| FrP, Høyre, Venstre, Rødt, SV, KrF, MDG | politics | none |\n| Støre | politics | none |\n| Solberg, Erna, Sylvi | none | none |\n| Listhaug | n/a | not in the dictionary |\n| Breivik, Quisling, Hitler | none | sensitive |\n\nEvery party gets the politics topic and none gets a tier. The only Norwegians in the sensitive tier are a mass\nmurderer and a Nazi collaborator.\n\n## Other languages\n\nThe same three tiers exist in every European dictionary I tried, Cyrillic included. The counts are entries, not lemmas,\nso heavily inflected languages like Polish and Russian look much worse than they are: every case and conjugation of a\nswear word is a separate entry.\n\n| Locale | Vulgar | Offensive | Sensitive | Notable |\n| --- | --- | --- | --- | --- |\n| en\\_US | 1,050 | 663 | 2,558 | *idiot* is sensitive |\n| en\\_GB | 1,055 | 872 | 2,337 | *chav* is offensive; *chink* is filed as **vulgar**, not offensive |\n| nb\\_NO | 2,393 | 1,324 | 6,446 | *idiot* is offensive |\n| da\\_DK | 1,179 | 3,314 | 8,551 | *fjols* (\"fool\") is offensive |\n| sv\\_SE | 637 | 1,247 | 16,193 | *idiot* is **vulgar**; *Putin* is sensitive |\n| fi\\_FI | 569 | 872 | 47 | The entire sensitive tier is *kakka* (\"poop\"), *kakkakasa* (\"pile of poop\") and *saakeli* |\n| de\\_DE | 3,218 | 3,518 | 9,446 | *Hitler* and *beknackt* (\"daft\") are offensive; *Trump* is clean |\n| nl\\_NL | 57 | 1,180 | 3,805 | Only 57 vulgar words, but *kanker* (\"cancer\", the classic Dutch swear) is one |\n| fr\\_FR | 2,151 | 262 | 5,562 | *boche* is offensive |\n| es\\_ES | 3,931 | 313 | 13,431 | *sudacas* and *fachas* are offensive |\n| it\\_IT | 3,886 | 377 | 6,543 | *terrone* is offensive, and so is *nazismi* |\n| pt\\_BR | 1,590 | 1,891 | 3,332 | *machista* and *velhinhos* (\"little old people\") are offensive |\n| pl\\_PL | 9,698 | 1,436 | 6,190 | The biggest vulgar tier here, mostly inflections (*dupczysz*, *srasz*) |\n| ru\\_RU | 10,821 | 3,239 | 24,721 | Same story: мат inflects a lot |\n\nThe bits don't seem to mean the same thing everywhere. Arabic and Hebrew return hundreds of thousands of \"sensitive\"\nentries, so those dictionaries probably reuse the bits for something else, and I left them out. Korean, Catalan and\nHungarian return nothing, and Japanese crashes my dumper.\n\nSamples from Norwegian, since that's what I type in when I'm not typing English:\n\n- **Vulgar:** faen, jævla, dritt, fitte, kuk, pule, pissehull, rævhull, pulekanin, kåt, *morrabrød*.\n- **Offensive:** *idiot*, *sigøyner*, *kinamann*, *riskokers* (literally \"rice cookers\", a slur for Asians), plus the\n  Norwegian n-word.\n- **Sensitive:** helvete, satan, homo, quisling, Breivik, skinhead, abortnekt, trusene (\"the panties\").\n\nThe tier words are mostly what you'd expect, but the edges are different in each language, and that is where the\nhuman-edited parts show. Norwegian calls *idiot* offensive and English calls it sensitive. German thinks Hitler is a\nslur.\n\n## Phrases, not just words\n\nThere is a second, separate filter. Every English language model has a `blocklist.bundle`, and there's a\n`qp_blocklist.bundle` for QuickPath, the swipe keyboard:\n\n```\n/System/Library/LinguisticData/RequiredAssets_en.bundle/AssetData/en.lm/\n├── blocklist.bundle/{blocklist.dat, blocklistidmap.dat}\n└── qp_blocklist.bundle/{blocklist.dat, blocklistidmap.dat}\n```\n\n`blocklistidmap.dat` is a 20-byte header followed by `(lexicon token ID, class ID)` pairs of 32-bit integers. Mapping\nthe token IDs back through the dictionary gives 2,544 words in 930 classes. Most classes are inflection groups:\n\n```\n931   fuck | fucked | fucking | fucks\n1181  molest | molestation | molested | molester | molesting\n1514  died | dies | dying\n1611  Holocaust | holocaust | holocausts\n1614  denied | denies | deny | denying\n923   Semite | Semites | Semitic\n1487  ghetto | ghettoes | ghettos\n1720  animals | brown | cats\n```\n\n`blocklist.dat` is a packed trie over those class IDs, so it blocks *sequences*: \"deny\" followed by \"Holocaust\", and\nwhatever 1720 pairs with. A class that puts *brown* next to *animals* and *cats* suggests the list targets specific\nphrasings rather than single words, though which phrasings I can't tell without decoding the trie. The runtime check is `LMLanguageModelTokenSequenceIsBlocklisted` in\n`LanguageModeling.framework`. I got far enough to learn that its fourth and fifth arguments include an output\npointer, but my probe still crashes intermittently, so I haven't read the actual phrases yet. That's for a follow-up.\n\n## Caveats\n\n- **Meanings are inferred.** Apple documents none of these bits. The tier names come from an enum in the system code\n  and the topics from reading thousands of samples. Both are consistent, but they're still a reading.\n- **Flagged is not censored.** As far as I can tell these flags decide what the keyboard volunteers, not what you can\n  type.\n- **One machine.** Everything here comes from macOS 15.6 (24G84) with LinguisticData build 438 from July 2025. iOS and\n  other macOS versions may ship different dictionaries.\n- **Private API.** The functions can change or disappear in any update. Don't ship this in an app.\n\n## Try it yourself\n\n```\n# Your own learned-swears database (probably empty on a Mac)\nsqlite3 -readonly ~/Library/Keyboard/VulgarWordUsage.db 'select * from vword_usage'\n\n# Build the Swift version from above and filter by tier\nswiftc -O lexflags.swift -o lexflags\n./lexflags en_US | awk -F'\\t' '$1 == \"vulgar\" {print $3}' | sort -u | less\n./lexflags nb_NO | awk -F'\\t' '$3 == \"faen\" || $3 == \"helvete\" || $3 == \"idiot\"'\n```\n\nIf you'd rather not build anything, the\n[gist](https://gist.github.com/HelgeSverre/25d9e54a09533e84ada32c2bc26e560c) has every tiered word for 15 locales as\nTSV, plus the code and a script that regenerates them. It's a snapshot of macOS 15.6 and won't be kept up to date.\n\nIf you find something funnier than *Oedipus*, I want to hear about it.\n","body_html":"<h2 id=\"tl-dr\">TL;DR</h2>\n<ul><li><p><code>~/Library/Keyboard/VulgarWordUsage.db</code> is real. It records which swear words you use, **per app and per</p><p>recipient**, so autocorrect learns to stop &quot;ducking&quot; you. On my Mac it is empty, and typing swear words into a native\napp did not fill it.</p></li><li><p>The interesting part is upstream. Apple&#39;s system dictionary flags every word with one of three tiers (<strong>vulgar</strong>,</p><p><strong>offensive</strong>, <strong>sensitive</strong>) and up to eleven topic flags (sex, drugs, religion, politics, violence, …).</p></li><li><p>There is no public API for any of it. I read the flags with a few private C functions from <code>Lexicon.framework</code>.</p><p>Code below, in C and in Swift. The full dumps for 15 languages are in\n<a href=\"https://gist.github.com/HelgeSverre/25d9e54a09533e84ada32c2bc26e560c\" rel=\"nofollow ugc noopener\">this gist</a> (uncensored, so mind the content\nwarning).</p></li><li><p>Highlights: <em>Oedipus</em> is vulgar. <em>Tom</em> and <em>Mick</em> are offensive. <em>pee</em>, <em>poo</em>, <em>niggle</em> and <em>underling</em> are</p><p>sensitive. And <strong>&quot;Trump&quot; is the only living politician in the English sensitive tier</strong>, next to Hitler, Mao, Osama\nbin Laden and the Taliban. Biden, Obama and Putin are clean.</p></li></ul>\n<p><strong>Content note:</strong> this article prints the words uncensored, slurs included, because the whole point is to see what\nApple flags. The one exception is the n-word: it is in the list in English and several other languages, and I&#39;m not\nwriting it out.</p>\n<h2 id=\"it-started-with-a-tweet\">It started with a tweet</h2>\n<figure><img src=\"https://helgesver.re/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvulgar-word-usage-tweet.289c366e.webp&amp;w=1200&amp;q=75\" alt=\"Tweet by Nick (@nicksdot): &#39;TIL: macOS has a database to track our use of profanity&#39;, showing a Finder listing with user_model_database.sqlite-wal and VulgarWordUsage.db. Helge replies &#39;Where is it located?&#39; and Nick answers &#39;~/Library/Keyboard/VulgarWordUsage.db&#39;.\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"no-referrer\" /></figure>\n<p><a href=\"https://x.com/nicksdot/status/2117656390428967014\" rel=\"nofollow ugc noopener\">Nick posted this</a>, I asked where it lives, and he answered. A\ndatabase that tracks my profanity is not something I can leave alone, so I opened mine.</p>\n<h2 id=\"the-database\">The database</h2>\n<pre><code>$ sqlite3 -readonly ~/Library/Keyboard/VulgarWordUsage.db .schema\nCREATE TABLE properties (ROWID INTEGER PRIMARY KEY, key, value, UNIQUE (key));\nCREATE TABLE IF NOT EXISTS &quot;vword_usage&quot; (\n    ROWID INTEGER PRIMARY KEY AUTOINCREMENT,\n    app                          TEXT, -- app identifier\n    recipient                    TEXT, -- recipient identifier\n    vword                        TEXT, -- vulgar word\n    word_reading                 TEXT, -- the reading form of a word (relevant for Japanese)\n    usage_count                  INTEGER DEFAULT 0,\n    last_use_timestamp           REAL DEFAULT 0, -- last use timestamp (seconds since the reference date)\n    journaled\n);\nCREATE UNIQUE INDEX app_recipient_vword_word_reading_idx ON vword_usage(app, recipient, vword, word_reading);</code></pre>\n<p>So the keyboard can know that you say <em>fuck</em> in Messages to one particular friend, but not in Mail to your boss. The\nunique index is on <code>(app, recipient, word, reading)</code>, so that is the granularity.</p>\n<p>Mine has zero rows. The <code>properties</code> table holds <code>version = 2</code> and nothing else. The file was last written in April\n2024.</p>\n<h3 id=\"what-it-is-for\">What it is for</h3>\n<p>At WWDC in June 2023, Craig Federighi announced the iOS 17 autocorrect rewrite with this line:\n<em>&quot;In those moments where you just want to type a ducking word, well, the keyboard will learn it, too.&quot;</em>\n(<a href=\"https://techcrunch.com/2023/06/05/thanks-to-ai-ios-17-will-learn-your-swears/\" rel=\"nofollow ugc noopener\">TechCrunch</a>,\n<a href=\"https://www.npr.org/2023/06/07/1180791069/apple-autocorrect-ducking\" rel=\"nofollow ugc noopener\">NPR</a>)</p>\n<p>This database is how it learns. The symbol names in the macOS shared library cache spell out the flow:</p>\n<pre><code>TI::VulgarWordUsageDatabaseWrapper::set_current_app_id(CFString)\nTI::VulgarWordUsageDatabaseWrapper::set_current_recipient_ids(vector&lt;string&gt;)\nTI::VulgarWordUsageDatabaseWrapper::increment_usage_count(word, reading, recipients)\nTI::VulgarWordUsageDatabaseWrapper::decrement_usage_count(...)\nTI::VulgarWordUsageDatabaseWrapper::can_autocorrect(word, app, recipients)\nTI::VulgarWordUsageDatabaseWrapper::can_autocorrect_somewhere(word, reading)\nKB::FilterNonVulgarIfTopCandidateVulgar::filter_candidates(...)\nKB::Candidate::every_vulgar_word_is_allowlisted(VulgarWordUsageDatabaseWrapper*, ...)</code></pre>\n<p>Plus log strings like <code>Passing recipient IDs to the vulgar word usage database wrapper; number of IDs: %lu</code>.</p>\n<p>In plain terms:</p>\n<ol><li>When you start typing, the keyboard engine tells the wrapper which app you&#39;re in and who you&#39;re writing to.</li><li><p>When you type a vulgar word and keep it, its count goes up for that app and those recipients. Undoing the word</p><p> brings the count back down.</p></li><li><p>When the engine ranks suggestions, it asks whether every vulgar word in a candidate is allowlisted for this</p><p> context. If it isn&#39;t, the clean alternative wins: <em>ducking</em>.</p></li></ol>\n<p>A <code>_KSUserWordsSynchroniser sharedAcrossLanguagesVulgarWordUsageValue</code> symbol suggests it syncs between devices like\nyour other learned words.</p>\n<h3 id=\"mine-is-empty\">Mine is empty</h3>\n<p>I tried to fill it. Using <a href=\"https://github.com/vercel-labs/agent-desktop\" rel=\"nofollow ugc noopener\">agent-desktop</a>, I opened a new TextEdit document\nand typed <code>well fuck this shit, damn it.</code>, first as a text insert, then as individual key presses. Nothing changed: no\nrow, no log line, and the file&#39;s modification date stayed in 2024.</p>\n<p>I don&#39;t know why, and I couldn&#39;t work it out. Maybe the Mac never records anything here, or maybe it only does so in\nsome apps or settings. If you&#39;ve got rows in yours, tell me what you did.</p>\n<p>That would be a short article. But the database only counts words that are <em>already</em> known to be vulgar. So who decides\nthat?</p>\n<h2 id=\"where-the-word-list-lives\">Where the word list lives</h2>\n<p>Searching the dyld shared cache for &quot;vulgar&quot; turned up a C API with an <code>LX</code> prefix\n(<code>LXVulgarWordUsageDatabaseCreate</code>, <code>LXVulgarWordUsageDatabaseCanAutocorrect</code>, …) and, more usefully, two functions on\ndictionary entries:</p>\n<pre><code>_LXEntryGetCategoryFlags\n_LXEntryGetMetaFlags</code></pre>\n<p><code>LX</code> is <code>Lexicon.framework</code>, a private framework that reads the per-language dictionaries under\n<code>/System/Library/LinguisticData/</code>. Every word in those dictionaries is an <code>LXEntry</code> with two 32-bit flag fields. If the\nvulgarity rating is anywhere, it&#39;s in those bits.</p>\n<h2 id=\"there-is-no-public-api\">There is no public API</h2>\n<p>I looked. <code>NSSpellChecker</code>, <code>UITextChecker</code>, <code>NaturalLanguage</code> and <code>UILexicon</code> don&#39;t expose vulgarity.\n<code>SensitiveContentAnalysis</code> covers images and video, not text. The only places &quot;profanity&quot; shows up on\ndeveloper.apple.com are App Store age ratings and review guidelines.</p>\n<p>So: private functions. Lexicon has no headers, but the C functions are exported, and their signatures are easy to\nguess because they follow CoreFoundation conventions. This program opens the dictionary for a locale, walks every entry,\nand prints both flag fields:</p>\n<pre><code>// lx.c — dump every word in a system lexicon with its flags.\n// clang -O1 -o lx lx.c -F/System/Library/PrivateFrameworks -framework Lexicon -framework CoreFoundation\n#include &lt;CoreFoundation/CoreFoundation.h&gt;\n#include &lt;stdbool.h&gt;\n#include &lt;stdio.h&gt;\n\ntypedef const void *LXLexiconRef, *LXCursorRef, *LXEntryRef;\nextern CFStringRef kLXLexiconLocaleKey;\nLXLexiconRef LXLexiconCreate(CFDictionaryRef options, CFErrorRef *error);\nLXCursorRef  LXLexiconCreateRootCursor(LXLexiconRef);\nvoid         LXCursorEnumerateEntriesRecursively(LXCursorRef, void (^)(LXEntryRef, bool *stop));\nCFStringRef  LXEntryCopyString(LXEntryRef);\nuint32_t     LXEntryGetCategoryFlags(LXEntryRef);\nuint32_t     LXEntryGetMetaFlags(LXEntryRef);\n\nint main(int argc, char **argv) {\n  CFStringRef locale = CFStringCreateWithCString(NULL, argc &gt; 1 ? argv[1] : &quot;en_US&quot;, kCFStringEncodingUTF8);\n  const void *keys[] = {kLXLexiconLocaleKey}, *values[] = {locale};\n  CFDictionaryRef options = CFDictionaryCreate(NULL, keys, values, 1, &amp;kCFTypeDictionaryKeyCallBacks,\n                                               &amp;kCFTypeDictionaryValueCallBacks);\n  LXLexiconRef lexicon = LXLexiconCreate(options, NULL);\n  if (!lexicon) return 1;\n\n  LXCursorEnumerateEntriesRecursively(LXLexiconCreateRootCursor(lexicon), ^(LXEntryRef entry, bool *stop) {\n    char word[512] = &quot;&quot;;\n    CFStringRef s = LXEntryCopyString(entry);\n    if (s) { CFStringGetCString(s, word, sizeof word, kCFStringEncodingUTF8); CFRelease(s); }\n    printf(&quot;%08x\\t%08x\\t%s\\n&quot;, LXEntryGetCategoryFlags(entry), LXEntryGetMetaFlags(entry), word);\n  });\n}</code></pre>\n<pre><code>$ ./lx en_US | wc -l\n  199019\n$ ./lx en_US | awk -F&#39;\\t&#39; &#39;$3 == &quot;fuck&quot; || $3 == &quot;table&quot; || $3 == &quot;Trump&quot;&#39;\n00000000    00800002    fuck\n00000000    00000000    table\n00002000    02000081    Trump</code></pre>\n<p>The same thing in Swift, loading the functions at runtime with <code>dlopen</code> and <code>dlsym</code> so you don&#39;t need to link against\na private framework. It prints only words that carry one of the three tiers:</p>\n<pre><code>// lexflags.swift — swiftc -O lexflags.swift -o lexflags &amp;&amp; ./lexflags en_US\nimport Foundation\n\nlet lexicon = dlopen(&quot;/System/Library/PrivateFrameworks/Lexicon.framework/Lexicon&quot;, RTLD_NOW)!\nfunc sym&lt;T&gt;(_ name: String, as _: T.Type) -&gt; T { unsafeBitCast(dlsym(lexicon, name)!, to: T.self) }\n\ntypealias LXRef = UnsafeRawPointer\nlet create     = sym(&quot;LXLexiconCreate&quot;, as: (@convention(c) (CFDictionary, UnsafeMutablePointer&lt;Unmanaged&lt;CFError&gt;?&gt;?) -&gt; LXRef?).self)\nlet rootCursor = sym(&quot;LXLexiconCreateRootCursor&quot;, as: (@convention(c) (LXRef) -&gt; LXRef?).self)\nlet enumerate  = sym(&quot;LXCursorEnumerateEntriesRecursively&quot;, as: (@convention(c) (LXRef, @convention(block) (LXRef, UnsafeMutablePointer&lt;Bool&gt;) -&gt; Void) -&gt; Void).self)\nlet copyString = sym(&quot;LXEntryCopyString&quot;, as: (@convention(c) (LXRef) -&gt; Unmanaged&lt;CFString&gt;?).self)\nlet metaFlags  = sym(&quot;LXEntryGetMetaFlags&quot;, as: (@convention(c) (LXRef) -&gt; UInt32).self)\nlet category   = sym(&quot;LXEntryGetCategoryFlags&quot;, as: (@convention(c) (LXRef) -&gt; UInt32).self)\nlet localeKey  = dlsym(lexicon, &quot;kLXLexiconLocaleKey&quot;)!.load(as: CFString.self)\n\nlet locale = CommandLine.arguments.dropFirst().first ?? &quot;en_US&quot;\nguard let lex = create([localeKey: locale] as CFDictionary, nil), let root = rootCursor(lex) else {\n    fatalError(&quot;could not open lexicon for \\(locale)&quot;)\n}\n\nlet tiers: [(UInt32, String)] = [(0x0080_0000, &quot;vulgar&quot;), (0x0100_0000, &quot;offensive&quot;), (0x0200_0000, &quot;sensitive&quot;)]\nenumerate(root) { entry, _ in\n    let meta = metaFlags(entry)\n    guard let tier = tiers.first(where: { meta &amp; $0.0 != 0 })?.1,\n          let word = copyString(entry)?.takeRetainedValue() else { return }\n    print(tier, String(format: &quot;%05x&quot;, category(entry)), word, separator: &quot;\\t&quot;)\n}</code></pre>\n<p>Both are read-only. They open the same dictionary the keyboard uses and print it.</p>\n<h2 id=\"decoding-the-bits\">Decoding the bits</h2>\n<p>Apple doesn&#39;t document these flags, so every meaning below is inferred: I grouped words by bit and read samples until\neach group&#39;s theme was obvious. The system code helps with one of them. An enum case called\n<code>offensiveVulgarSensitive</code> sits right next to the vulgar-word code, and three adjacent meta bits match it.</p>\n<h3 id=\"the-three-tiers-meta-flags\">The three tiers (meta flags)</h3>\n<div class=\"table-wrap\"><table><thead><tr><th>Bit</th><th>Tier</th><th>en_US words</th><th>Examples</th></tr></thead><tbody><tr><td><code>0x00800000</code></td><td>vulgar</td><td>1,050</td><td>fuck, shit, cunt, cock, crap, wtf, fml, bullshitting, fucktard, shizzle, merde</td></tr><tr><td><code>0x01000000</code></td><td>offensive</td><td>663</td><td>kike, wop, dago, fag, Paki, japs, Klansman, retard, Oriental, ass, asshole</td></tr><tr><td><code>0x02000000</code></td><td>sensitive</td><td>2,558</td><td>damn, bitch, idiot, LSD, abortion, gun, suicide, anus, pee, poo</td></tr></tbody></table></div>\n<p>In en_US a word has at most one tier: they never overlap. Out of 199,019 entries, 4,271 have one.</p>\n<p>Roughly: <strong>vulgar</strong> is swearing and sex slang, <strong>offensive</strong> is slurs aimed at groups of people, and <strong>sensitive</strong> is\neverything a keyboard shouldn&#39;t offer you unprompted: mild swears, insults, drugs, weapons, extremism, disease and\nbodily functions.</p>\n<h3 id=\"the-topics-category-flags\">The topics (category flags)</h3>\n<p>The other field is a topic bitmask, and a word can have several topics:</p>\n<div class=\"table-wrap\"><table><thead><tr><th>Bit</th><th>Topic</th><th>en_US words</th><th>Examples</th></tr></thead><tbody><tr><td><code>0x00100</code></td><td>excretion</td><td>123</td><td>feces, barf, crapper, piddle, pooped</td></tr><tr><td><code>0x00200</code></td><td>body parts</td><td>958</td><td>nipples, navel, buttock, perineum, triceps</td></tr><tr><td><code>0x00400</code></td><td>insults, identity-loaded</td><td>823</td><td>idiot, cretin, hick, pleb, sexist, homophobic, blacklist</td></tr><tr><td><code>0x00800</code></td><td>disease</td><td>93</td><td>Covid, herpes, PTSD, leprosy, monkeypox</td></tr><tr><td><code>0x01000</code></td><td>drugs</td><td>222</td><td>heroin, shroom, crackhead, hotbox, OD</td></tr><tr><td><code>0x02000</code></td><td>politics, extremism</td><td>266</td><td>Hamas, Goebbels, Leninism, democrat, swastikas, Trump</td></tr><tr><td><code>0x04000</code></td><td>religion, damnation</td><td>420</td><td>Sikhism, jihadi, Beelzebub, damn, hell, jeez</td></tr><tr><td><code>0x08000</code></td><td>sex</td><td>473</td><td>nude, nookie, lecher, harlots, Pornhub, Hooters</td></tr><tr><td><code>0x10000</code></td><td>violence, death</td><td>373</td><td>suicide, lynch, murders, hangings, slave, slaveholder</td></tr><tr><td><code>0x20000</code></td><td>weapons, terrorism</td><td>268</td><td>AK-47, grenadier, jihad, sarin, kamikaze, yellowcake</td></tr><tr><td><code>0x40000</code></td><td>catch-all &quot;sensitive context&quot;</td><td>1,080</td><td>God, Allah, Jews, gay, trans, bi, crazy, fat, ugly, sex, die</td></tr></tbody></table></div>\n<p>The topic flags and the tiers are independent. 2,052 English words have a topic but no tier: <em>gay</em>, <em>fat</em>, <em>God</em>,\n<em>Allah</em> and <em>sex</em> are all tagged &quot;sensitive context&quot; but are not vulgar, offensive or sensitive. My guess is the topic\nis a hint (&quot;be careful how you rank this&quot;) and the tier is the rule.</p>\n<p>The lower meta bits are dull: proper nouns, abbreviations, camel-case brand names like <em>iMac</em> and <em>tvOS</em>. Nothing to see\nthere.</p>\n<h2 id=\"the-weird-ones\">The weird ones</h2>\n<p>This is where it gets fun. Some flags are obviously right, and some made me laugh.</p>\n<h3 id=\"vulgar\">Vulgar</h3>\n<ul><li><strong>Oedipus</strong>: vulgar. Presumably because of <em>motherfucker</em>-adjacent jokes, or the complex. Sophocles would be thrilled.</li><li><strong>reams</strong>: vulgar. As in &quot;to ream someone&quot;.</li><li><strong>cooties</strong>: vulgar. Your nine-year-old is swearing.</li><li><strong>orgy</strong>, <strong>sext</strong>, <strong>merde</strong>: fair enough.</li></ul>\n<h3 id=\"offensive\">Offensive</h3>\n<ul><li><strong>Tom</strong> and <strong>Mick</strong>: offensive. <em>Uncle Tom</em> and the slur for Irish people, but also very common first names.</li><li><strong>Oriental</strong>: offensive.</li><li><strong>papooses</strong>: offensive.</li><li><strong>conservatards</strong>: offensive, the one political insult I found in the slur tier.</li><li><p><strong>niggardly</strong>: offensive. It means &quot;stingy&quot; and comes from Old Norse, unrelated to the slur. It has also caused</p><p><a href=\"https://en.wikipedia.org/wiki/Controversies_about_the_word_niggardly\" rel=\"nofollow ugc noopener\">real controversies</a>, which is presumably why\nit&#39;s there.</p></li><li><strong>ass</strong> and <strong>asshole</strong>: offensive, not vulgar.</li></ul>\n<h3 id=\"sensitive\">Sensitive</h3>\n<ul><li><strong>pee</strong> and <strong>poo</strong>: sensitive, with the excretion topic. So are <em>premenstrual</em>, <em>leprosy</em> and <em>herpesvirus</em>.</li><li><p><strong>niggle</strong> (a small worry, of Scandinavian origin) and <strong>underling</strong> (Old English for a subordinate) are sensitive and</p><p>share the insult topic. Similar words aren&#39;t flagged: <em>snigger</em> is clean but <em>niggle</em> is flagged, and <em>minion</em>,\n<em>lackey</em>, <em>flunky</em> and <em>stooge</em> are clean but <em>underling</em> is flagged. These look like hand-picked entries, not rules.</p></li><li><p><strong>blacklist</strong> and <strong>whitelist</strong> are sensitive with the insult/identity topic. That matches the industry move to</p><p><em>blocklist</em> and <em>allowlist</em>. Apple&#39;s own phrase-filter files are named <code>blocklist.dat</code>.</p></li><li><p><strong>Braves</strong> and <strong>Chiefs</strong> (team names with Native American mascots), <strong>Londonderry</strong> (the contested name for Derry),</p><p><strong>Gentile</strong>, <strong>Jehovah</strong>, <strong>Mongol</strong> and <strong>Frenchier</strong> are all sensitive.</p></li><li><strong>Isis</strong> is sensitive with the politics topic. Sorry to the Egyptian goddess.</li><li><strong>slave</strong>, <strong>slavery</strong> and <strong>slaveholder</strong> are sensitive with the violence topic.</li><li><strong>idiot</strong> is sensitive in English. Norwegian is stricter and puts <em>idiot</em> in the offensive tier.</li></ul>\n<h2 id=\"the-trump-flag\">The Trump flag</h2>\n<p>The sensitive tier has 109 capitalized words. Here is all of it:</p>\n<blockquote><p>Al-Qaeda, Al-Qaida, Aryan, Aryans, Auschwitz, Bacchus, Beelzebub, Birkenau, Brave(s), Buchenwald, Chief(s),\nChippendale(s), Christ-y, Christer(s), Crip(s), Dachau, Eichmann, Frenchier, Gentile(s), Gestapo(s), Goebbels,\nGoering, Hamas, Hezbollah, Himmler, Hitler, Hitlerian, Hitlerism, Hitlerite(s), Hitlerjugend, Hooters, Isis,\nIslamophobe(s), Islamophobic, Jehovah(s), Jewfro(s), Jezebel(s), Kalashnikov(s), Kristallnacht, Kuomintang,\nLondonderry, Luftwaffe, Mao, Mauthausen, Mickie(s), Mollie(s), Mongol(s), Mossad, Nazi(s), Nazism, Osama, Pornhub,\nQuaalude(s), Reich, Reichsmark, Reichstag, Sachsenhausen, Satan, Satanism, Shoah, Sinophobe(s), Sinophobic, Sodom,\nStasi, Taliban, Treblinka, <strong>Trump, Trumps</strong>, Unabomber, Uzi(s)</p></blockquote>\n<p>(Plurals and possessives folded for brevity.)</p>\n<p>Every other real person on that list is dead, and nearly all of them are Nazi officials, dictators or terrorists.\nThen there&#39;s Trump:</p>\n<pre><code>category  meta      word\n00002000  02000081  Trump        sensitive tier + politics topic\n00002000  02000081  Trumps\n00002000  02000081  Trump&#39;s\n00000000  00000000  trump        (the card-game word: clean)\n00000000  00000000  trumped</code></pre>\n<p>For comparison:</p>\n<div class=\"table-wrap\"><table><thead><tr><th>Word</th><th>en_US</th></tr></thead><tbody><tr><td>Trump</td><td>sensitive, politics topic</td></tr><tr><td>Hitler</td><td>sensitive, politics topic</td></tr><tr><td>Biden</td><td>clean</td></tr><tr><td>Obama</td><td>clean</td></tr><tr><td>Putin</td><td>clean</td></tr><tr><td>Stalin</td><td>clean</td></tr><tr><td>Musk</td><td>not in the dictionary</td></tr></tbody></table></div>\n<p><code>en_GB</code> matches <code>en_US</code>. Other languages differ: the German dictionary has <em>Trump</em> clean (and puts <em>Hitler</em> in the\n<strong>offensive</strong> tier), and Swedish is the one that flags <em>Putin</em> as sensitive.</p>\n<p>What the flag <em>does</em> matters here. As far as I can tell, a sensitive word is one the keyboard shouldn&#39;t suggest on its\nown. You can still type it and it won&#39;t be corrected away. Think &quot;keep this out of the QuickType bar unless the user is\nclearly heading there&quot;, which is a lot milder than a ban.</p>\n<p>There is a plausible reason Apple would want that for one specific name. In February 2025, iPhone dictation briefly\nshowed &quot;Trump&quot; when people said &quot;racist&quot;. It went viral, and Apple called it a\n&quot;<a href=\"https://www.nbcnews.com/tech/apple-glitch-voice-to-text-trump-rcna193733\" rel=\"nofollow ugc noopener\">phonetic overlap</a>&quot; in the speech model and\nshipped a fix within a day\n(<a href=\"https://9to5mac.com/2025/02/25/iphone-trump-siri-racist-bug/\" rel=\"nofollow ugc noopener\">9to5Mac</a>). The dictionary files on my Mac are from\nJuly 2025. A rule that keeps the name out of unprompted suggestions would stop that kind of thing from happening\nagain through the keyboard. I can&#39;t prove that&#39;s why it&#39;s there, and I don&#39;t have an older dictionary to compare\nagainst. But it fits.</p>\n<h3 id=\"norwegian-politics-for-comparison\">Norwegian politics, for comparison</h3>\n<p>Because I&#39;m Norwegian and had to check:</p>\n<div class=\"table-wrap\"><table><thead><tr><th>Word</th><th>Topic</th><th>Tier</th></tr></thead><tbody><tr><td>FrP, Høyre, Venstre, Rødt, SV, KrF, MDG</td><td>politics</td><td>none</td></tr><tr><td>Støre</td><td>politics</td><td>none</td></tr><tr><td>Solberg, Erna, Sylvi</td><td>none</td><td>none</td></tr><tr><td>Listhaug</td><td>n/a</td><td>not in the dictionary</td></tr><tr><td>Breivik, Quisling, Hitler</td><td>none</td><td>sensitive</td></tr></tbody></table></div>\n<p>Every party gets the politics topic and none gets a tier. The only Norwegians in the sensitive tier are a mass\nmurderer and a Nazi collaborator.</p>\n<h2 id=\"other-languages\">Other languages</h2>\n<p>The same three tiers exist in every European dictionary I tried, Cyrillic included. The counts are entries, not lemmas,\nso heavily inflected languages like Polish and Russian look much worse than they are: every case and conjugation of a\nswear word is a separate entry.</p>\n<div class=\"table-wrap\"><table><thead><tr><th>Locale</th><th>Vulgar</th><th>Offensive</th><th>Sensitive</th><th>Notable</th></tr></thead><tbody><tr><td>en_US</td><td>1,050</td><td>663</td><td>2,558</td><td><em>idiot</em> is sensitive</td></tr><tr><td>en_GB</td><td>1,055</td><td>872</td><td>2,337</td><td><em>chav</em> is offensive; <em>chink</em> is filed as <strong>vulgar</strong>, not offensive</td></tr><tr><td>nb_NO</td><td>2,393</td><td>1,324</td><td>6,446</td><td><em>idiot</em> is offensive</td></tr><tr><td>da_DK</td><td>1,179</td><td>3,314</td><td>8,551</td><td><em>fjols</em> (&quot;fool&quot;) is offensive</td></tr><tr><td>sv_SE</td><td>637</td><td>1,247</td><td>16,193</td><td><em>idiot</em> is <strong>vulgar</strong>; <em>Putin</em> is sensitive</td></tr><tr><td>fi_FI</td><td>569</td><td>872</td><td>47</td><td>The entire sensitive tier is <em>kakka</em> (&quot;poop&quot;), <em>kakkakasa</em> (&quot;pile of poop&quot;) and <em>saakeli</em></td></tr><tr><td>de_DE</td><td>3,218</td><td>3,518</td><td>9,446</td><td><em>Hitler</em> and <em>beknackt</em> (&quot;daft&quot;) are offensive; <em>Trump</em> is clean</td></tr><tr><td>nl_NL</td><td>57</td><td>1,180</td><td>3,805</td><td>Only 57 vulgar words, but <em>kanker</em> (&quot;cancer&quot;, the classic Dutch swear) is one</td></tr><tr><td>fr_FR</td><td>2,151</td><td>262</td><td>5,562</td><td><em>boche</em> is offensive</td></tr><tr><td>es_ES</td><td>3,931</td><td>313</td><td>13,431</td><td><em>sudacas</em> and <em>fachas</em> are offensive</td></tr><tr><td>it_IT</td><td>3,886</td><td>377</td><td>6,543</td><td><em>terrone</em> is offensive, and so is <em>nazismi</em></td></tr><tr><td>pt_BR</td><td>1,590</td><td>1,891</td><td>3,332</td><td><em>machista</em> and <em>velhinhos</em> (&quot;little old people&quot;) are offensive</td></tr><tr><td>pl_PL</td><td>9,698</td><td>1,436</td><td>6,190</td><td>The biggest vulgar tier here, mostly inflections (<em>dupczysz</em>, <em>srasz</em>)</td></tr><tr><td>ru_RU</td><td>10,821</td><td>3,239</td><td>24,721</td><td>Same story: мат inflects a lot</td></tr></tbody></table></div>\n<p>The bits don&#39;t seem to mean the same thing everywhere. Arabic and Hebrew return hundreds of thousands of &quot;sensitive&quot;\nentries, so those dictionaries probably reuse the bits for something else, and I left them out. Korean, Catalan and\nHungarian return nothing, and Japanese crashes my dumper.</p>\n<p>Samples from Norwegian, since that&#39;s what I type in when I&#39;m not typing English:</p>\n<ul><li><strong>Vulgar:</strong> faen, jævla, dritt, fitte, kuk, pule, pissehull, rævhull, pulekanin, kåt, <em>morrabrød</em>.</li><li><p><strong>Offensive:</strong> <em>idiot</em>, <em>sigøyner</em>, <em>kinamann</em>, <em>riskokers</em> (literally &quot;rice cookers&quot;, a slur for Asians), plus the</p><p>Norwegian n-word.</p></li><li><strong>Sensitive:</strong> helvete, satan, homo, quisling, Breivik, skinhead, abortnekt, trusene (&quot;the panties&quot;).</li></ul>\n<p>The tier words are mostly what you&#39;d expect, but the edges are different in each language, and that is where the\nhuman-edited parts show. Norwegian calls <em>idiot</em> offensive and English calls it sensitive. German thinks Hitler is a\nslur.</p>\n<h2 id=\"phrases-not-just-words\">Phrases, not just words</h2>\n<p>There is a second, separate filter. Every English language model has a <code>blocklist.bundle</code>, and there&#39;s a\n<code>qp_blocklist.bundle</code> for QuickPath, the swipe keyboard:</p>\n<pre><code>/System/Library/LinguisticData/RequiredAssets_en.bundle/AssetData/en.lm/\n├── blocklist.bundle/{blocklist.dat, blocklistidmap.dat}\n└── qp_blocklist.bundle/{blocklist.dat, blocklistidmap.dat}</code></pre>\n<p><code>blocklistidmap.dat</code> is a 20-byte header followed by <code>(lexicon token ID, class ID)</code> pairs of 32-bit integers. Mapping\nthe token IDs back through the dictionary gives 2,544 words in 930 classes. Most classes are inflection groups:</p>\n<pre><code>931   fuck | fucked | fucking | fucks\n1181  molest | molestation | molested | molester | molesting\n1514  died | dies | dying\n1611  Holocaust | holocaust | holocausts\n1614  denied | denies | deny | denying\n923   Semite | Semites | Semitic\n1487  ghetto | ghettoes | ghettos\n1720  animals | brown | cats</code></pre>\n<p><code>blocklist.dat</code> is a packed trie over those class IDs, so it blocks <em>sequences</em>: &quot;deny&quot; followed by &quot;Holocaust&quot;, and\nwhatever 1720 pairs with. A class that puts <em>brown</em> next to <em>animals</em> and <em>cats</em> suggests the list targets specific\nphrasings rather than single words, though which phrasings I can&#39;t tell without decoding the trie. The runtime check is <code>LMLanguageModelTokenSequenceIsBlocklisted</code> in\n<code>LanguageModeling.framework</code>. I got far enough to learn that its fourth and fifth arguments include an output\npointer, but my probe still crashes intermittently, so I haven&#39;t read the actual phrases yet. That&#39;s for a follow-up.</p>\n<h2 id=\"caveats\">Caveats</h2>\n<ul><li><p><strong>Meanings are inferred.</strong> Apple documents none of these bits. The tier names come from an enum in the system code</p><p>and the topics from reading thousands of samples. Both are consistent, but they&#39;re still a reading.</p></li><li><p><strong>Flagged is not censored.</strong> As far as I can tell these flags decide what the keyboard volunteers, not what you can</p><p>type.</p></li><li><p><strong>One machine.</strong> Everything here comes from macOS 15.6 (24G84) with LinguisticData build 438 from July 2025. iOS and</p><p>other macOS versions may ship different dictionaries.</p></li><li><strong>Private API.</strong> The functions can change or disappear in any update. Don&#39;t ship this in an app.</li></ul>\n<h2 id=\"try-it-yourself\">Try it yourself</h2>\n<pre><code># Your own learned-swears database (probably empty on a Mac)\nsqlite3 -readonly ~/Library/Keyboard/VulgarWordUsage.db &#39;select * from vword_usage&#39;\n\n# Build the Swift version from above and filter by tier\nswiftc -O lexflags.swift -o lexflags\n./lexflags en_US | awk -F&#39;\\t&#39; &#39;$1 == &quot;vulgar&quot; {print $3}&#39; | sort -u | less\n./lexflags nb_NO | awk -F&#39;\\t&#39; &#39;$3 == &quot;faen&quot; || $3 == &quot;helvete&quot; || $3 == &quot;idiot&quot;&#39;</code></pre>\n<p>If you&#39;d rather not build anything, the\n<a href=\"https://gist.github.com/HelgeSverre/25d9e54a09533e84ada32c2bc26e560c\" rel=\"nofollow ugc noopener\">gist</a> has every tiered word for 15 locales as\nTSV, plus the code and a script that regenerates them. It&#39;s a snapshot of macOS 15.6 and won&#39;t be kept up to date.</p>\n<p>If you find something funnier than <em>Oedipus</em>, I want to hear about it.</p>","headings":[{"level":2,"text":"TL;DR","id":"tl-dr"},{"level":2,"text":"It started with a tweet","id":"it-started-with-a-tweet"},{"level":2,"text":"The database","id":"the-database"},{"level":3,"text":"What it is for","id":"what-it-is-for"},{"level":3,"text":"Mine is empty","id":"mine-is-empty"},{"level":2,"text":"Where the word list lives","id":"where-the-word-list-lives"},{"level":2,"text":"There is no public API","id":"there-is-no-public-api"},{"level":2,"text":"Decoding the bits","id":"decoding-the-bits"},{"level":3,"text":"The three tiers (meta flags)","id":"the-three-tiers-meta-flags"},{"level":3,"text":"The topics (category flags)","id":"the-topics-category-flags"},{"level":2,"text":"The weird ones","id":"the-weird-ones"},{"level":3,"text":"Vulgar","id":"vulgar"},{"level":3,"text":"Offensive","id":"offensive"},{"level":3,"text":"Sensitive","id":"sensitive"},{"level":2,"text":"The Trump flag","id":"the-trump-flag"},{"level":3,"text":"Norwegian politics, for comparison","id":"norwegian-politics-for-comparison"},{"level":2,"text":"Other languages","id":"other-languages"},{"level":2,"text":"Phrases, not just words","id":"phrases-not-just-words"},{"level":2,"text":"Caveats","id":"caveats"},{"level":2,"text":"Try it yourself","id":"try-it-yourself"}]}}