private List<DictionaryEntry> doLookUp(IDictionary dict, String word) { String[] stemmed = tokenizer.tokenizeWordsToStrings(word, StemmingMode.MATCHING); if (stemmed.length == 0) { // Stop word. Skip. return Collections.<DictionaryEntry>emptyList(); } try { List<DictionaryEntry> result = dict.readArticles(word); if (!result.isEmpty()) { return result; } // The verbatim word didn't get any hits; try the stem. if (stemmed.length > 1 && doFuzzyMatching()) { return dict.readArticlesPredictive(stemmed[0]); } } catch (Exception ex) { Log.log(ex); } return Collections.<DictionaryEntry>emptyList(); }