parent
3d0477fbd2
commit
ca008d82d4
|
@ -112,7 +112,7 @@ void Correction::setCorrectionParams(const int skipPos, const int excessivePos,
|
||||||
mMaxErrors = maxErrors;
|
mMaxErrors = maxErrors;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Correction::checkState() {
|
void Correction::checkState() const {
|
||||||
if (DEBUG_DICT) {
|
if (DEBUG_DICT) {
|
||||||
int inputCount = 0;
|
int inputCount = 0;
|
||||||
if (mSkipPos >= 0) ++inputCount;
|
if (mSkipPos >= 0) ++inputCount;
|
||||||
|
@ -121,12 +121,12 @@ void Correction::checkState() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Correction::sameAsTyped() {
|
bool Correction::sameAsTyped() const {
|
||||||
return mProximityInfoState.sameAsTyped(mWord, mOutputIndex);
|
return mProximityInfoState.sameAsTyped(mWord, mOutputIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Correction::getFreqForSplitMultipleWords(const int *freqArray, const int *wordLengthArray,
|
int Correction::getFreqForSplitMultipleWords(const int *freqArray, const int *wordLengthArray,
|
||||||
const int wordCount, const bool isSpaceProximity, const int *word) {
|
const int wordCount, const bool isSpaceProximity, const int *word) const {
|
||||||
return Correction::RankingAlgorithm::calcFreqForSplitMultipleWords(freqArray, wordLengthArray,
|
return Correction::RankingAlgorithm::calcFreqForSplitMultipleWords(freqArray, wordLengthArray,
|
||||||
wordCount, this, isSpaceProximity, word);
|
wordCount, this, isSpaceProximity, word);
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,8 @@ class Correction {
|
||||||
void setCorrectionParams(const int skipPos, const int excessivePos, const int transposedPos,
|
void setCorrectionParams(const int skipPos, const int excessivePos, const int transposedPos,
|
||||||
const int spaceProximityPos, const int missingSpacePos, const bool useFullEditDistance,
|
const int spaceProximityPos, const int missingSpacePos, const bool useFullEditDistance,
|
||||||
const bool doAutoCompletion, const int maxErrors);
|
const bool doAutoCompletion, const int maxErrors);
|
||||||
void checkState();
|
void checkState() const;
|
||||||
bool sameAsTyped();
|
bool sameAsTyped() const;
|
||||||
bool initProcessState(const int index);
|
bool initProcessState(const int index);
|
||||||
|
|
||||||
int getInputIndex() const;
|
int getInputIndex() const;
|
||||||
|
@ -77,7 +77,7 @@ class Correction {
|
||||||
}
|
}
|
||||||
|
|
||||||
int getFreqForSplitMultipleWords(const int *freqArray, const int *wordLengthArray,
|
int getFreqForSplitMultipleWords(const int *freqArray, const int *wordLengthArray,
|
||||||
const int wordCount, const bool isSpaceProximity, const int *word);
|
const int wordCount, const bool isSpaceProximity, const int *word) const;
|
||||||
int getFinalProbability(const int probability, int **word, int *wordLength);
|
int getFinalProbability(const int probability, int **word, int *wordLength);
|
||||||
int getFinalProbabilityForSubQueue(const int probability, int **word, int *wordLength,
|
int getFinalProbabilityForSubQueue(const int probability, int **word, int *wordLength,
|
||||||
const int inputSize);
|
const int inputSize);
|
||||||
|
|
|
@ -87,7 +87,7 @@ class WordsPriorityQueue {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SuggestedWord *top() {
|
SuggestedWord *top() const {
|
||||||
if (mSuggestions.empty()) return 0;
|
if (mSuggestions.empty()) return 0;
|
||||||
SuggestedWord *sw = mSuggestions.top();
|
SuggestedWord *sw = mSuggestions.top();
|
||||||
return sw;
|
return sw;
|
||||||
|
|
Loading…
Reference in New Issue