respond(suggestions.iterator(), cmd, id);
}
private void doSpell(final String cmd, final String id, final JSONArray paramArray)
{
final SpellChecker checker = new SpellChecker(dict);
final Set<String> errors = new HashSet<String>();
checker.addSpellCheckListener(new SpellCheckListener()
{
public void spellingError(SpellCheckEvent event)
{
errors.add(event.getInvalidWord());
}
});
JSONArray words = paramArray.optJSONArray(1);
checker.checkSpelling(new StringWordTokenizer(words.toString()));
respond(errors.iterator(), cmd, id);
}