Reduce weight of missing-char suggestions.
parent
71351469e3
commit
f51d16a4aa
|
@ -230,8 +230,9 @@ Dictionary::getWordsRec(int pos, int depth, int maxDepth, bool completion, int s
|
||||||
if (terminal) {
|
if (terminal) {
|
||||||
if (//INCLUDE_TYPED_WORD_IF_VALID ||
|
if (//INCLUDE_TYPED_WORD_IF_VALID ||
|
||||||
!sameAsTyped(mWord, depth + 1)) {
|
!sameAsTyped(mWord, depth + 1)) {
|
||||||
addWord(mWord, depth + 1,
|
int finalFreq = freq * snr * addedWeight;
|
||||||
(freq * snr * addedWeight * mFullWordMultiplier));
|
if (mSkipPos < 0) finalFreq *= mFullWordMultiplier;
|
||||||
|
addWord(mWord, depth + 1, finalFreq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (childrenAddress != 0) {
|
if (childrenAddress != 0) {
|
||||||
|
|
|
@ -244,9 +244,9 @@ public class ExpandableDictionary extends Dictionary {
|
||||||
if (terminal) {
|
if (terminal) {
|
||||||
if (INCLUDE_TYPED_WORD_IF_VALID
|
if (INCLUDE_TYPED_WORD_IF_VALID
|
||||||
|| !same(word, depth + 1, codes.getTypedWord())) {
|
|| !same(word, depth + 1, codes.getTypedWord())) {
|
||||||
callback.addWord(word, 0, depth + 1,
|
int finalFreq = freq * snr * addedAttenuation;
|
||||||
(int) (freq * snr * addedAttenuation
|
if (skipPos < 0) finalFreq *= FULL_WORD_FREQ_MULTIPLIER;
|
||||||
* FULL_WORD_FREQ_MULTIPLIER));
|
callback.addWord(word, 0, depth + 1, finalFreq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (children != null) {
|
if (children != null) {
|
||||||
|
|
Loading…
Reference in New Issue