Question

Is there a way to retrieve words randomly from the built in Dictionary through the SDK?

I can provide my own list of words but using the built in Dictionary allows for easy localization.

Was it helpful?

Solution

Unfortunately this is one of the areas of the iPhone that applications have no access to.

However there are a number of free dictionaries available that you could use as an alternative. It's easy enough to convert a text-based file into ansqlite database which then makes it super easy to pick words at random.

And yes, as you point out localization is a problem with this :(

OTHER TIPS

No access is provided to the Spell Checker.

The iPhone checks for spelling in UITextField objects. Create a UITextField as a user input area. Declare your interface to conform to the protocol. Add any other delegates and then utilize UITextChecker

It has stuff like availableLanguages, hasLearnedWord, learnWord, unlearnWord It also has guessesForWordRange:inString:language that returns a list of words that are possible valid replacements for a misspelled word.

For more information check out the iPhone OS Reference Library on UITextChecker http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITextChecker_Class/Reference/Reference.html

DougPan

Lexicontext (my library) provides such functionality for English words, although not from the built-in dictionary, but from a WordNet instance that is built into it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top