aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/dictionary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/dictionary.cpp')
-rw-r--r--native/src/dictionary.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/native/src/dictionary.cpp b/native/src/dictionary.cpp
index a49769bdb..9e32ee80f 100644
--- a/native/src/dictionary.cpp
+++ b/native/src/dictionary.cpp
@@ -57,4 +57,12 @@ bool Dictionary::isValidWord(unsigned short *word, int length) {
return mUnigramDictionary->isValidWord(word, length);
}
+int Dictionary::getBigramPosition(unsigned short *word, int length) {
+ if (IS_LATEST_DICT_VERSION) {
+ return mUnigramDictionary->getBigramPosition(DICTIONARY_HEADER_SIZE, word, 0, length);
+ } else {
+ return mUnigramDictionary->getBigramPosition(0, word, 0, length);
+ }
+}
+
} // namespace latinime