aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/unigram_dictionary.h
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-06-16 22:51:11 +0900
committerJean Chalard <jchalard@google.com>2011-06-16 23:28:09 +0900
commit17e44a72e846d1514c5b2b4d0ad80e3fbbf26fdd (patch)
treefdd3f1ab516b20190f265f6954c309875dadf485 /native/src/unigram_dictionary.h
parent8124e64dccb2027fcdcf19b76490769087f55cc2 (diff)
downloadlatinime-17e44a72e846d1514c5b2b4d0ad80e3fbbf26fdd.tar.gz
latinime-17e44a72e846d1514c5b2b4d0ad80e3fbbf26fdd.tar.xz
latinime-17e44a72e846d1514c5b2b4d0ad80e3fbbf26fdd.zip
New dict format, step 3
Some refactoring and add of a parameter that will be necessary. Bug: 4392433 Change-Id: I17f001a7efd4f69f4c35f94ee1ca8e97391b81d5
Diffstat (limited to 'native/src/unigram_dictionary.h')
-rw-r--r--native/src/unigram_dictionary.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/native/src/unigram_dictionary.h b/native/src/unigram_dictionary.h
index cf871fffe..b8e4914fa 100644
--- a/native/src/unigram_dictionary.h
+++ b/native/src/unigram_dictionary.h
@@ -59,7 +59,7 @@ private:
void getSuggestionCandidates(const int skipPos, const int excessivePos,
const int transposedPos, int *nextLetters, const int nextLettersSize,
const int maxDepth);
- int isValidWordRec(int pos, unsigned short *word, int offset, int length);
+ int getFrequency(int pos, unsigned short *word, int offset, int length) const;
void getVersionNumber();
bool checkIfDictVersionIsLatest();
int getAddress(int *pos);
@@ -100,7 +100,7 @@ private:
const int diffs, const int skipPos, const int excessivePos, const int transposedPos,
int *nextLetters, const int nextLettersSize, int *newCount, int *newChildPosition,
bool *newTraverseAllNodes, int *newSnr, int*newInputIndex, int *newDiffs,
- int *nextSiblingPosition);
+ int *nextSiblingPosition, int *nextOutputIndex);
int getBestWordFreq(const int startInputIndex, const int inputLength, unsigned short *word);
// Process a node by considering missing space
bool processCurrentNodeForExactMatch(const int firstChildPos,
@@ -145,6 +145,7 @@ private:
int mStackInputIndex[MAX_WORD_LENGTH_INTERNAL];
int mStackDiffs[MAX_WORD_LENGTH_INTERNAL];
int mStackSiblingPos[MAX_WORD_LENGTH_INTERNAL];
+ int mStackOutputIndex[MAX_WORD_LENGTH_INTERNAL];
int mNextLettersFrequency[NEXT_LETTERS_SIZE];
};