aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/correction.h
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-08-17 17:55:16 +0900
committersatok <satok@google.com>2011-08-19 17:10:10 +0900
commit9db2097f7bbfce0b4679d80cf8a4f6127616f1ae (patch)
treeb7ef7f0de2128d6a503dffcc68346c2ebb9dac8f /native/src/correction.h
parent961453c3b3a8eb3aefb2cebdbcc315c98c2abbd4 (diff)
downloadlatinime-9db2097f7bbfce0b4679d80cf8a4f6127616f1ae.tar.gz
latinime-9db2097f7bbfce0b4679d80cf8a4f6127616f1ae.tar.xz
latinime-9db2097f7bbfce0b4679d80cf8a4f6127616f1ae.zip
Do the transposed correction and the excessive correction by one loop
Change-Id: Idc7a3451a65f7b980e5c499e9083f67646b3a199
Diffstat (limited to 'native/src/correction.h')
-rw-r--r--native/src/correction.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/native/src/correction.h b/native/src/correction.h
index 871a04251..3cd600cf0 100644
--- a/native/src/correction.h
+++ b/native/src/correction.h
@@ -113,8 +113,6 @@ private:
int mMaxEditDistance;
int mMaxDepth;
int mInputLength;
- int mExcessivePos;
- int mTransposedPos;
int mSpaceProximityPos;
int mMissingSpacePos;
int mTerminalInputIndex;
@@ -126,15 +124,26 @@ private:
CorrectionState mCorrectionStates[MAX_WORD_LENGTH_INTERNAL];
// The following member variables are being used as cache values of the correction state.
+ bool mNeedsToTraverseAllNodes;
int mOutputIndex;
int mInputIndex;
+
int mProximityCount;
+ int mExcessiveCount;
+ int mTransposedCount;
int mSkippedCount;
+
+ int mTransposedPos;
+ int mExcessivePos;
int mSkipPos;
- bool mNeedsToTraverseAllNodes;
+
+ bool mLastCharExceeded;
+
bool mMatching;
- bool mSkipping;
bool mProximityMatching;
+ bool mExceeding;
+ bool mTransposing;
+ bool mSkipping;
class RankingAlgorithm {
public: