Home | History | Annotate | Download | only in src

Lines Matching refs:Correction

17 #define LOG_TAG "LatinIME: correction.cpp"
22 #include "correction.h"
72 // Correction //
75 void Correction::resetCorrection() {
79 void Correction::initCorrection(const ProximityInfo *pi, const int inputSize, const int maxDepth) {
89 void Correction::initCorrectionState(
98 void Correction::setCorrectionParams(const int skipPos, const int excessivePos,
117 void Correction::checkState() const {
126 bool Correction::sameAsTyped() const {
130 int Correction::getFreqForSplitMultipleWords(const int *freqArray, const int *wordLengthArray,
132 return Correction::RankingAlgorithm::calcFreqForSplitMultipleWords(freqArray, wordLengthArray,
136 int Correction::getFinalProbability(const int probability, int **word, int *wordLength) {
140 int Correction::getFinalProbabilityForSubQueue(const int probability, int **word, int *wordLength,
145 bool Correction::initProcessState(const int outputIndex) {
175 int Correction::goDownTree(const int parentIndex, const int childCount, const int firstChildPos) {
183 int Correction::getInputIndex() const {
187 bool Correction::needsToPrune() const {
202 Correction::CorrectionType Correction::processCharAndCalcState(const int c, const bool isTerminal) {
298 // including proximity correction.
330 // but we already know that "excessive char correction" just happened
344 // we will try other correction-types. Please note that mCorrectionStates[mOutputIndex]
398 // 1.2. Excessive or transpose correction
419 // 3. Skip correction
476 // 4. Last char excessive correction
538 /* static */ int Correction::RankingAlgorithm::calculateFinalProbability(const int inputIndex,
539 const int outputIndex, const int freq, int *editDistanceTable, const Correction *correction,
541 const int excessivePos = correction->getExcessivePos();
542 const int typedLetterMultiplier = correction->TYPED_LETTER_MULTIPLIER;
543 const int fullWordMultiplier = correction->FULL_WORD_MULTIPLIER;
544 const ProximityInfoState *proximityInfoState = &correction->mProximityInfoState;
545 const int skippedCount = correction->mSkippedCount;
546 const int transposedCount = correction->mTransposedCount / 2;
547 const int excessiveCount = correction->mExcessiveCount + correction->mTransposedCount % 2;
548 const int proximityMatchedCount = correction->mProximityCount;
549 const bool lastCharExceeded = correction->mLastCharExceeded;
550 const bool useFullEditDistance = correction->mUseFullEditDistance;
561 const int matchCount = inputSize - correction->mProximityCount - excessiveCount;
563 const int *word = correction->mWord;
572 dumpEditDistance10ForDebug(editDistanceTable, correction->mInputSize, outputLength);
584 ed = getCurrentEditDistance(editDistanceTable, correction->mInputSize, outputLength,
624 // Promotion and Demotion for each correction
658 const int squaredDistance = correction->mDistances[i];
675 const int squaredDistance = correction->mDistances[i];
692 AKLOGI("Found a proximity correction.");
725 // Promote a word with no correction
771 DUMP_WORD(correction->getPrimaryInputWord(), inputSize);
772 DUMP_WORD(correction->mWord, outputLength);
781 /* static */ int Correction::RankingAlgorithm::calcFreqForSplitMultipleWords(const int *freqArray,
782 const int *wordLengthArray, const int wordCount, const Correction *correction,
784 const int typedLetterMultiplier = correction->TYPED_LETTER_MULTIPLIER;
884 // A word pair with one space proximity correction
886 AKLOGI("Found a word pair with space proximity correction.");
911 /* static */ int Correction::RankingAlgorithm::editDistance(const int *before,
946 /* static */ float Correction::RankingAlgorithm::calcNormalizedScore(const int *before,