Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What information is stored by iOS Spell Checker?

I have heard that Apple's spell checker for UITextView maintains some kind of logging of what you type in individual applications. I have a secure application where spell checking is a useful feature, however I don't want new words logged to somewhere outside of my application. Can anyone refer me to an Apple reference document or technical description of what information is captured by spell check, and where it is captured too?

like image 424
BadPirate Avatar asked Jan 26 '12 18:01

BadPirate


People also ask

What does spell check do on iPhone?

Auto-Correction uses your keyboard dictionary to spellcheck words as you type, automatically correcting misspelled words for you. To use it, just type in a text field. To make sure that this setting is turned on, use these steps: Open the Settings app.

What errors will spell check identify?

Spell check identifies and corrects misspelled words. It also allows you to search a document yourself for words you know you've misspelled. In Microsoft Word, spell check options, like spelling and grammar may be found under the 'review' tab and 'proofing' window.

Does spell check identify all spelling errors?

Not all misspellings and grammar mistakes that Word identifies will be actual mistakes. For example, names will often be marked as misspelled words, even when they're properly spelled. You can ignore these errors so that they'll no longer be underlined and won't appear in spelling and grammar checks.

What algorithm does spell check use?

Spell checkers can use approximate string matching algorithms such as Levenshtein distance to find correct spellings of misspelled words. An alternative type of spell checker uses solely statistical information, such as n-grams, to recognize errors instead of correctly-spelled words.


2 Answers

Not sure if this helps much, but you could do spell checking manually with the UITextChecker class which allows setting a list of ignored words:

- (void)setIgnoredWords:(NSArray *)words

More here: https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITextChecker_Class/Reference/Reference.html

You can also check whether the word has been learned with:

+ (BOOL)hasLearnedWord:(NSString *)word
like image 160
danielbeard Avatar answered Nov 07 '22 04:11

danielbeard


I don't know definitively, but using fseventer, learning the word "aple" in TextEdit saves that word to ~/Library/Spelling/LocalDictionary. Ignoring a word seems not to modify the filesystem at all, and indeed, if the document is closed and not saved, and a new document with that previously-ignored word is opened, it is no longer ignored. This is consistent with +learnWord: being a class method, and -ignoreWord: being an instance method. So for security, you could probably just never call +learnWord:, and instead have your own backend to persistently/securely store a list of ignored words.

like image 41
btown Avatar answered Nov 07 '22 04:11

btown