Prune out suggestions that have a very large edit distance.
If the number of keys picked from proximity is too large, prune out
the subtree. Otherwise you get vastly unrelated suggestions.
Fix a bug introduced with the missing_chars checkin.
diff --git a/dictionary/src/dictionary.h b/dictionary/src/dictionary.h
index 70dfa73..9173e39 100644
--- a/dictionary/src/dictionary.h
+++ b/dictionary/src/dictionary.h
@@ -51,7 +51,7 @@
bool addWord(unsigned short *word, int length, int frequency);
unsigned short toLowerCase(unsigned short c, int depth);
void getWordsRec(int pos, int depth, int maxDepth, bool completion, int frequency,
- int inputIndex);
+ int inputIndex, int diffs);
bool isValidWordRec(int pos, unsigned short *word, int offset, int length);
unsigned char *mDict;
@@ -67,6 +67,7 @@
int mMaxAlternatives;
unsigned short mWord[128];
int mSkipPos;
+ int mMaxEditDistance;
int mFullWordMultiplier;
int mTypedLetterMultiplier;