aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/correction.h
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-08-12 01:05:27 +0900
committersatok <satok@google.com>2011-08-15 17:13:39 +0900
commit0cedd2bcc3efcec30ea542ceb8d9161afa764a62 (patch)
tree1ed4aae5072e65481e99a85e5767b0493ef40b26 /native/src/correction.h
parent88b22e255291c708005f2fce70310a7a4b036bcb (diff)
downloadlatinime-0cedd2bcc3efcec30ea542ceb8d9161afa764a62.tar.gz
latinime-0cedd2bcc3efcec30ea542ceb8d9161afa764a62.tar.xz
latinime-0cedd2bcc3efcec30ea542ceb8d9161afa764a62.zip
Combilne normal correction and skip correction
Change-Id: Ide868d977c0f35900340c7be1b71d572c69a8806
Diffstat (limited to 'native/src/correction.h')
-rw-r--r--native/src/correction.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/native/src/correction.h b/native/src/correction.h
index 2fa8c905d..9d385a44e 100644
--- a/native/src/correction.h
+++ b/native/src/correction.h
@@ -120,6 +120,8 @@ private:
int mTerminalInputIndex;
int mTerminalOutputIndex;
unsigned short mWord[MAX_WORD_LENGTH_INTERNAL];
+ // Caveat: Do not create multiple tables per thread as this table eats up RAM a lot.
+ int mEditDistanceTable[MAX_WORD_LENGTH_INTERNAL * MAX_WORD_LENGTH_INTERNAL];
CorrectionState mCorrectionStates[MAX_WORD_LENGTH_INTERNAL];
@@ -132,11 +134,13 @@ private:
bool mNeedsToTraverseAllNodes;
bool mMatching;
bool mSkipping;
+ bool mProximityMatching;
class RankingAlgorithm {
public:
static int calculateFinalFreq(const int inputIndex, const int depth,
- const int freq, const bool sameLength, const Correction* correction);
+ const int freq, const bool sameLength, int *editDistanceTable,
+ const Correction* correction);
static int calcFreqForSplitTwoWords(const int firstFreq, const int secondFreq,
const Correction* correction);
};