diff options
Diffstat (limited to 'native/src/correction_state.h')
-rw-r--r-- | native/src/correction_state.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/native/src/correction_state.h b/native/src/correction_state.h index e03b2a17c..7bbad5f5b 100644 --- a/native/src/correction_state.h +++ b/native/src/correction_state.h @@ -32,7 +32,12 @@ public: void initCorrectionState(const ProximityInfo *pi, const int inputLength); void setCorrectionParams(const int skipPos, const int excessivePos, const int transposedPos, const int spaceProximityPos, const int missingSpacePos); + void initDepth(); void checkState(); + void goUpTree(const int matchCount); + void slideTree(const int matchCount); + void goDownTree(int *matchedCount); + void charMatched(); virtual ~CorrectionState(); int getSkipPos() const { return mSkipPos; @@ -50,13 +55,13 @@ public: return mMissingSpacePos; } int getFreqForSplitTwoWords(const int firstFreq, const int secondFreq); - int getFinalFreq(const int inputIndex, const int depth, const int matchWeight, const int freq, - const bool sameLength); + int getFinalFreq(const int inputIndex, const int outputIndex, const int freq); private: const int TYPED_LETTER_MULTIPLIER; const int FULL_WORD_MULTIPLIER; + const ProximityInfo *mProximityInfo; int mInputLength; int mSkipPos; @@ -65,6 +70,8 @@ private: int mSpaceProximityPos; int mMissingSpacePos; + int mMatchedCharCount; + class RankingAlgorithm { public: static int calculateFinalFreq(const int inputIndex, const int depth, |