mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Add correction confidence threshold
This commit is contained in:
parent
abc5a74004
commit
1d4b07566c
@ -194,6 +194,11 @@ public class LanguageModel {
|
||||
}
|
||||
}
|
||||
|
||||
// Threshold if the model is confident enough
|
||||
if(outProbabilities[0] <= 7.0f * outProbabilities[1]) {
|
||||
mustNotAutocorrect = true;
|
||||
}
|
||||
|
||||
if(!partialWord.isEmpty() && !mustNotAutocorrect) {
|
||||
kind = SuggestedWords.SuggestedWordInfo.KIND_WHITELIST | SuggestedWords.SuggestedWordInfo.KIND_FLAG_APPROPRIATE_FOR_AUTO_CORRECTION;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user