diff options
author | 2012-01-27 00:01:27 -0800 | |
---|---|---|
committer | 2012-01-27 00:01:27 -0800 | |
commit | 23f486f770883ed690d897ac71de0184456bf24e (patch) | |
tree | cef7457b20c8c8725c1a84ab8741d065a54ff557 /native/src/correction.h | |
parent | c882d619bfe6eace7330c2097008500e81d39512 (diff) | |
parent | 9955716d0bb8b370eeab3bb4c9ab3108c45c7289 (diff) | |
download | latinime-23f486f770883ed690d897ac71de0184456bf24e.tar.gz latinime-23f486f770883ed690d897ac71de0184456bf24e.tar.xz latinime-23f486f770883ed690d897ac71de0184456bf24e.zip |
Merge "Merge missing space and mistyped space correction algorithm"
Diffstat (limited to 'native/src/correction.h')
-rw-r--r-- | native/src/correction.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/native/src/correction.h b/native/src/correction.h index aec7bbd73..b246070fe 100644 --- a/native/src/correction.h +++ b/native/src/correction.h @@ -122,7 +122,8 @@ class Correction { bool needsToPrune() const; int getFreqForSplitTwoWords( - const int firstFreq, const int secondFreq, const unsigned short *word); + const int *freqArray, const int *wordLengthArray, const bool isSpaceProximity, + 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); @@ -150,8 +151,9 @@ class Correction { static int calculateFinalFreq(const int inputIndex, const int depth, 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 calcFreqForSplitTwoWords(const int *freqArray, const int *wordLengthArray, + const Correction* correction, const bool isSpaceProximity, + const unsigned short *word); static double calcNormalizedScore(const unsigned short* before, const int beforeLength, const unsigned short* after, const int afterLength, const int score); static int editDistance(const unsigned short* before, |