diff options
author | 2011-08-11 21:25:39 +0900 | |
---|---|---|
committer | 2011-08-11 23:01:54 +0900 | |
commit | 466ed22fc6f90c47bc1571b51fda2712ade664f6 (patch) | |
tree | 313f02a0d0e92c96e6928183ca52fb4acf6e140b /native/src/correction.h | |
parent | c122cfc8fd9e14d8b6e193770b33cf669ff6239c (diff) | |
download | latinime-466ed22fc6f90c47bc1571b51fda2712ade664f6.tar.gz latinime-466ed22fc6f90c47bc1571b51fda2712ade664f6.tar.xz latinime-466ed22fc6f90c47bc1571b51fda2712ade664f6.zip |
Removed matchedChar count
Change-Id: I69e92026f802635f900b1e72d089afe4bda5fb0b
Diffstat (limited to 'native/src/correction.h')
-rw-r--r-- | native/src/correction.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/native/src/correction.h b/native/src/correction.h index 0aa5660a6..2fa8c905d 100644 --- a/native/src/correction.h +++ b/native/src/correction.h @@ -48,8 +48,6 @@ public: void checkState(); bool initProcessState(const int index); - void getProcessState(int *matchedCount, int *inputIndex, int *outputIndex, - bool *traverseAllNodes, int *diffs); int getOutputIndex(); int getInputIndex(); @@ -80,10 +78,6 @@ public: CorrectionType processCharAndCalcState(const int32_t c, const bool isTerminal); - int getDiffs() const { - return mDiffs; - } - ///////////////////////// // Tree helper methods int goDownTree(const int parentIndex, const int childCount, const int firstChildPos); @@ -100,7 +94,6 @@ public: return mCorrectionStates[index].mParentIndex; } private: - inline void charMatched(); inline void incrementInputIndex(); inline void incrementOutputIndex(); inline bool needsToTraverseAllNodes(); @@ -109,8 +102,8 @@ private: inline CorrectionType processSkipChar(const int32_t c, const bool isTerminal); // TODO: remove - inline void incrementDiffs() { - ++mDiffs; + inline void incrementProximityCount() { + ++mProximityCount; } const int TYPED_LETTER_MULTIPLIER; @@ -133,8 +126,7 @@ private: // The following member variables are being used as cache values of the correction state. int mOutputIndex; int mInputIndex; - int mDiffs; - int mMatchedCharCount; + int mProximityCount; int mSkippedCount; int mSkipPos; bool mNeedsToTraverseAllNodes; @@ -144,8 +136,7 @@ private: class RankingAlgorithm { public: static int calculateFinalFreq(const int inputIndex, const int depth, - const int matchCount, const int freq, const bool sameLength, - const Correction* correction); + const int freq, const bool sameLength, const Correction* correction); static int calcFreqForSplitTwoWords(const int firstFreq, const int secondFreq, const Correction* correction); }; |