Skip to content

Commit

Permalink
Merge pull request #93 from jaumeortola/master
Browse files Browse the repository at this point in the history
Case-changed words are always good suggestions.
  • Loading branch information
dweiss authored Jul 31, 2017
2 parents 405c381 + d63f33e commit 07814de
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ public List<String> findReplacements(final String w) {
candidates.clear();
if (word.length() > 0 && word.length() < MAX_WORD_LENGTH && !isInDictionary(word)) {
List<String> wordsToCheck = new ArrayList<String>();
if (replacementsTheRest != null && word.length() > MIN_WORD_LENGTH) {
if (replacementsTheRest != null && word.length() > 1) {
for (final String wordChecked : getAllReplacements(word, 0, 0)) {
boolean found = false;
if (isInDictionary(wordChecked)) {
candidates.add(new CandidateData(wordChecked, 0));
found = true;
} else if (dictionaryMetadata.isConvertingCase()) {
} else {
String lowerWord = wordChecked.toLowerCase(dictionaryMetadata.getLocale());
String upperWord = wordChecked.toUpperCase(dictionaryMetadata.getLocale());
if (isInDictionary(lowerWord)) {
Expand Down

0 comments on commit 07814de

Please sign in to comment.