diff options
author | 2012-06-30 08:53:33 +0900 | |
---|---|---|
committer | 2012-07-02 20:20:42 +0900 | |
commit | 8658e552f350167bb8f5af7b9e991775f2cc6a6d (patch) | |
tree | dd2045310f65d25f74ad9ef390595620b72a397a /native/jni/src/dictionary.cpp | |
parent | 26c45718a595e96a3fffd4fc6307e926a8c2ad70 (diff) | |
download | latinime-8658e552f350167bb8f5af7b9e991775f2cc6a6d.tar.gz latinime-8658e552f350167bb8f5af7b9e991775f2cc6a6d.tar.xz latinime-8658e552f350167bb8f5af7b9e991775f2cc6a6d.zip |
Makefile and source code structure update for LatinIME AOSP build
Change-Id: Ia2ab54651ef96521fce01fe4755147909b818803
Diffstat (limited to 'native/jni/src/dictionary.cpp')
-rw-r--r-- | native/jni/src/dictionary.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/native/jni/src/dictionary.cpp b/native/jni/src/dictionary.cpp index 10ea9fe06..60f3c949b 100644 --- a/native/jni/src/dictionary.cpp +++ b/native/jni/src/dictionary.cpp @@ -22,6 +22,7 @@ #include "binary_format.h" #include "defines.h" #include "dictionary.h" +#include "incremental_decoder_interface.h" namespace latinime { @@ -43,7 +44,8 @@ Dictionary::Dictionary(void *dict, int dictSize, int mmapFd, int dictBufAdjust, mUnigramDictionary = new UnigramDictionary(mDict + headerSize, typedLetterMultiplier, fullWordMultiplier, maxWordLength, maxWords, options); mBigramDictionary = new BigramDictionary(mDict + headerSize, maxWordLength); - mGestureDecoder = new GestureDecoder(maxWordLength, maxWords); + mGestureDecoder = IncrementalDecoderInterface::getGestureDecoderInstance(maxWordLength, + maxWords); mGestureDecoder->setDict(mUnigramDictionary, mBigramDictionary, mDict + headerSize /* dict root */, 0 /* root pos */); } @@ -51,6 +53,7 @@ Dictionary::Dictionary(void *dict, int dictSize, int mmapFd, int dictBufAdjust, Dictionary::~Dictionary() { delete mUnigramDictionary; delete mBigramDictionary; + delete mGestureDecoder; } int Dictionary::getFrequency(const int32_t *word, int length) const { |