diff options
author | 2012-01-26 22:49:13 +0900 | |
---|---|---|
committer | 2012-01-27 16:54:15 +0900 | |
commit | 9955716d0bb8b370eeab3bb4c9ab3108c45c7289 (patch) | |
tree | 59f5ebcda52f88e9716c937a6c24fabe3cbdd80d /native/src/correction.h | |
parent | 5971a0a0bbbb671bb5b7d5cc7829ddf169c0cc7a (diff) | |
download | latinime-9955716d0bb8b370eeab3bb4c9ab3108c45c7289.tar.gz latinime-9955716d0bb8b370eeab3bb4c9ab3108c45c7289.tar.xz latinime-9955716d0bb8b370eeab3bb4c9ab3108c45c7289.zip |
Merge missing space and mistyped space correction algorithm
Change-Id: Idd64d38d3d29be24748f9c0359667883698a5756
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, |