aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/correction.h
diff options
context:
space:
mode:
authorYusuke Nojima <nojima@google.com>2011-10-06 19:12:20 +0900
committerYusuke Nojima <nojima@google.com>2011-10-11 15:28:32 +0900
commita4c1f1c1fde5e9492523842dd95a4c9f17f40c3a (patch)
treeb8442a6f2bf365d840bcb94d8843b2404203b151 /native/src/correction.h
parentce9e4f926b69745834df677501e59c6db3744de4 (diff)
downloadlatinime-a4c1f1c1fde5e9492523842dd95a4c9f17f40c3a.tar.gz
latinime-a4c1f1c1fde5e9492523842dd95a4c9f17f40c3a.tar.xz
latinime-a4c1f1c1fde5e9492523842dd95a4c9f17f40c3a.zip
Calibrate the scores of the proximity chars according to the distances.
+1 75 -1 27 +2 0 -2 0 +3 0 -3 0 +4 30 -4 48 +5 37 -5 27 +6 4 -6 35 +7 9 -7 18 Change-Id: I3c6ab06a0084c18ab595147c36c2ff4b1e961a7b
Diffstat (limited to 'native/src/correction.h')
-rw-r--r--native/src/correction.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/native/src/correction.h b/native/src/correction.h
index 522c65f48..437ef77f4 100644
--- a/native/src/correction.h
+++ b/native/src/correction.h
@@ -115,7 +115,11 @@ private:
int mMissingSpacePos;
int mTerminalInputIndex;
int mTerminalOutputIndex;
+
+ // The following arrays are state buffer.
unsigned short mWord[MAX_WORD_LENGTH_INTERNAL];
+ int mDistances[MAX_WORD_LENGTH_INTERNAL];
+
// Edit distance calculation requires a buffer with (N+1)^2 length for the input length N.
// Caveat: Do not create multiple tables per thread as this table eats up RAM a lot.
int mEditDistanceTable[(MAX_WORD_LENGTH_INTERNAL + 1) * (MAX_WORD_LENGTH_INTERNAL + 1)];
@@ -128,7 +132,6 @@ private:
int mInputIndex;
int mEquivalentCharCount;
- int mSumOfDistance;
int mProximityCount;
int mExcessiveCount;
int mTransposedCount;