aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/correction.h
diff options
context:
space:
mode:
authorsatok <satok@google.com>2012-01-19 02:21:18 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-19 02:21:18 -0800
commit2010130e4425bd18f68d9de3ec7b846d00c61e0a (patch)
treea0129f2a670cd7adc8634fa3e5cb9eb3adcffc3f /native/src/correction.h
parent0ef9bfe5932cb1b099809b4622bf45427f0430dd (diff)
parent54af64ae921baa764d64c11c7f4f8edd6352d405 (diff)
downloadlatinime-2010130e4425bd18f68d9de3ec7b846d00c61e0a.tar.gz
latinime-2010130e4425bd18f68d9de3ec7b846d00c61e0a.tar.xz
latinime-2010130e4425bd18f68d9de3ec7b846d00c61e0a.zip
Merge "Two words error correction with other error correction for the first word"
Diffstat (limited to 'native/src/correction.h')
-rw-r--r--native/src/correction.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/native/src/correction.h b/native/src/correction.h
index 22a424f5c..0715551d0 100644
--- a/native/src/correction.h
+++ b/native/src/correction.h
@@ -75,6 +75,8 @@ class Correction {
int getFreqForSplitTwoWords(
const int firstFreq, const int secondFreq, const unsigned short *word);
int getFinalFreq(const int freq, unsigned short **word, int* wordLength);
+ int getFinalFreqForSubQueue(const int freq, unsigned short **word, int* wordLength,
+ const int inputLength);
CorrectionType processCharAndCalcState(const int32_t c, const bool isTerminal);
@@ -97,7 +99,8 @@ class Correction {
class RankingAlgorithm {
public:
static int calculateFinalFreq(const int inputIndex, const int depth,
- const int freq, int *editDistanceTable, const Correction* correction);
+ const int freq, int *editDistanceTable, const Correction* correction,
+ const int inputLength);
static int calcFreqForSplitTwoWords(const int firstFreq, const int secondFreq,
const Correction* correction, const unsigned short *word);
static int calcFreqForSplitTwoWordsOld(const int firstFreq, const int secondFreq,
@@ -122,6 +125,8 @@ class Correction {
const int32_t c, const bool isTerminal, const bool inputIndexIncremented);
inline CorrectionType processUnrelatedCorrectionType();
inline void addCharToCurrentWord(const int32_t c);
+ inline int getFinalFreqInternal(const int freq, unsigned short **word, int* wordLength,
+ const int inputLength);
const int TYPED_LETTER_MULTIPLIER;
const int FULL_WORD_MULTIPLIER;