aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/unigram_dictionary.cpp
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-01-16 18:48:19 +0900
committerJean Chalard <jchalard@google.com>2012-01-16 18:58:10 +0900
commit82ddd168893892cfe4366e1e2fa9e9bfeb5478a5 (patch)
treefb646f0e6582b4836088ca21308d4621e61a1585 /native/src/unigram_dictionary.cpp
parentd64b8c97fea0ab5dd6d16feef329127dc7ecc833 (diff)
downloadlatinime-82ddd168893892cfe4366e1e2fa9e9bfeb5478a5.tar.gz
latinime-82ddd168893892cfe4366e1e2fa9e9bfeb5478a5.tar.xz
latinime-82ddd168893892cfe4366e1e2fa9e9bfeb5478a5.zip
Stop avoiding adding what the user typed to candidates
There does not seem to be any reason other than a historical one to avoid doing this, but it takes processing power and makes things more complicated. This has a very limited impact on regression tests: 5 -> 3 [He, the] 5 -> 3 [An, an] 5 -> 3 [Where, where] 5 -> 3 [This, this] 7 -> 1 [wAtch, watch] 6 -> 4 [oveNs, oceans] 5 -> 1 [Ahere, Where] 7 -> 1 [Hast, Hast] 7 -> 5 [bjp, bill] 5 -> 1 [What, What] 5 -> 3 [Sound, So und] 7 -> 3 [causalities, casualties] 7 -> 3 [discontentment, discontent] 7 -> 3 [irregardless, regardless] 5 -> 1 : 2 5 -> 3 : 5 6 -> 4 : 1 7 -> 1 : 2 7 -> 3 : 3 7 -> 5 : 1 +1 4 -1 0 +2 0 -2 0 +3 8 -3 0 +4 1 -4 0 +5 1 -5 7 +6 0 -6 1 +7 0 -7 6 Change-Id: I6407cf922f27bbd3992df11d63690e71fc61111b
Diffstat (limited to 'native/src/unigram_dictionary.cpp')
-rw-r--r--native/src/unigram_dictionary.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/native/src/unigram_dictionary.cpp b/native/src/unigram_dictionary.cpp
index 85e7e9bf2..69e3200fc 100644
--- a/native/src/unigram_dictionary.cpp
+++ b/native/src/unigram_dictionary.cpp
@@ -335,7 +335,7 @@ inline void UnigramDictionary::onTerminal(const int freq,
int wordLength;
unsigned short* wordPointer;
const int finalFreq = correction->getFinalFreq(freq, &wordPointer, &wordLength);
- if (finalFreq >= 0) {
+ if (finalFreq != NOT_A_FREQUENCY) {
if (!terminalAttributes.isShortcutOnly()) {
if (addToMasterQueue) {
addWord(wordPointer, wordLength, finalFreq, masterQueue);