mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-20 08:50:25 +00:00
improve garbage words being created in batch input mode
this likely depends on library
This commit is contained in:
parent
0918935e09
commit
965038744b
1 changed files with 4 additions and 0 deletions
|
@ -917,6 +917,10 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
|
|||
// this may not be the most efficient way, but getting suggestions is much slower anyway
|
||||
for (SuggestedWordInfo info : dictionarySuggestions) {
|
||||
if (!isBlacklisted(info.getWord())) {
|
||||
// for some reason, user history produces garbage words in batch mode
|
||||
// this also happens for other dictionaries, but for those the score usually is much lower, so they are less visible
|
||||
if (composedData.mIsBatchMode && dictType.equals(Dictionary.TYPE_USER_HISTORY) && !dictionary.isInDictionary(info.getWord()))
|
||||
continue;
|
||||
suggestions.add(info);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue