Fix comments in the sample spell checker service

Change-Id: I553a9820756f1a6a1164c7a4a66820556cb3fdcc
This commit is contained in:
satok
2011-10-05 20:04:27 +09:00
parent 4fce7f7a17
commit d9d9dae507

View File

@@ -43,8 +43,9 @@ public class SampleSpellCheckerService extends SpellCheckerService {
} }
final String input = textInfo.getText(); final String input = textInfo.getText();
final int length = input.length(); final int length = input.length();
// length <= 3 for too short words // Just a fake logic:
// length > 20 for too long words that is possibly CJK words // length <= 3 for short words that we assume are in the fake dictionary
// length > 20 for too long words that we assume can't be recognized (such as CJK words)
final int flags = length <= 3 ? SuggestionsInfo.RESULT_ATTR_IN_THE_DICTIONARY final int flags = length <= 3 ? SuggestionsInfo.RESULT_ATTR_IN_THE_DICTIONARY
: length <= 20 ? SuggestionsInfo.RESULT_ATTR_LOOKS_LIKE_TYPO : 0; : length <= 20 ? SuggestionsInfo.RESULT_ATTR_LOOKS_LIKE_TYPO : 0;
return new SuggestionsInfo(flags, return new SuggestionsInfo(flags,