If you ever tried to type such words as “fuck”, or “fucking” on your iPhone, you most likely ended up with “duck”, and “ducking”, if you didn’t manually select the right word you wanted to type. While the iPhone is supposed to add words you typed several times to its dictionary, it doesn’t work for some words (fuck being one of them).
That database is stored in the “mobile” user directory, in /private/var/mobile/Library/Keyboard. The file is called dynamic-text.dat. It consists of a (mostly) plain text list of words that the iPhone has marked for special attention. Once a word appears in that list, the autocorrect feature updates itself and accepts those items as proper spellings. It’s really convenient for jargon words and last names that are part of your normal typing but don’t appear in the standard dictionary.
How to fix this? Simply go to Safari, and open a new browser (very important!). Now tap the Google search field and start typing the word you want to add to the dictionary. Tap “Google” to launch the search. Now you can close Safari and open your Notes app and type “fuck”. No more “duck”! Your iPhone finally learned a bad word!