aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/correction.h
diff options
context:
space:
mode:
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);
};