aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-10-01 08:29:14 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-01 08:29:14 +0000
commit841aa0b6f8e969cb18f35fc80728190b0fda1c01 (patch)
treed68432162b06cdb6d85815d250348e4ca745ebcf /native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp
parentd368975cdb53c075ec39141406b03bdedf266265 (diff)
parent287e155e44b4e937f2a62d010805702bc813c43b (diff)
downloadlatinime-841aa0b6f8e969cb18f35fc80728190b0fda1c01.tar.gz
latinime-841aa0b6f8e969cb18f35fc80728190b0fda1c01.tar.xz
latinime-841aa0b6f8e969cb18f35fc80728190b0fda1c01.zip
Merge "Move HistoricalInfo to property and use it in *Property."
Diffstat (limited to 'native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp')
-rw-r--r--native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp
index 19aeb2895..da8c2ac03 100644
--- a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp
+++ b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp
@@ -373,7 +373,8 @@ static bool latinime_BinaryDictionary_addUnigramEntry(JNIEnv *env, jclass clazz,
}
// Use 1 for count to indicate the word has inputted.
const UnigramProperty unigramProperty(isBeginningOfSentence, isNotAWord,
- isBlacklisted, probability, timestamp, 0 /* level */, 1 /* count */, &shortcuts);
+ isBlacklisted, probability, HistoricalInfo(timestamp, 0 /* level */, 1 /* count */),
+ &shortcuts);
return dictionary->addUnigramEntry(CodePointArrayView(codePoints, codePointCount),
&unigramProperty);
}
@@ -405,7 +406,7 @@ static bool latinime_BinaryDictionary_addNgramEntry(JNIEnv *env, jclass clazz, j
env->GetIntArrayRegion(word, 0, wordLength, wordCodePoints);
// Use 1 for count to indicate the ngram has inputted.
const NgramProperty ngramProperty(CodePointArrayView(wordCodePoints, wordLength).toVector(),
- probability, timestamp, 0 /* level */, 1 /* count */);
+ probability, HistoricalInfo(timestamp, 0 /* level */, 1 /* count */));
return dictionary->addNgramEntry(&prevWordsInfo, &ngramProperty);
}
@@ -494,8 +495,8 @@ static int latinime_BinaryDictionary_addMultipleDictionaryEntries(JNIEnv *env, j
}
// Use 1 for count to indicate the word has inputted.
const UnigramProperty unigramProperty(false /* isBeginningOfSentence */, isNotAWord,
- isBlacklisted, unigramProbability, timestamp, 0 /* level */, 1 /* count */,
- &shortcuts);
+ isBlacklisted, unigramProbability,
+ HistoricalInfo(timestamp, 0 /* level */, 1 /* count */), &shortcuts);
dictionary->addUnigramEntry(CodePointArrayView(word1CodePoints, word1Length),
&unigramProperty);
if (word0) {
@@ -503,7 +504,7 @@ static int latinime_BinaryDictionary_addMultipleDictionaryEntries(JNIEnv *env, j
// Use 1 for count to indicate the bigram has inputted.
const NgramProperty ngramProperty(
CodePointArrayView(word1CodePoints, word1Length).toVector(),
- bigramProbability, timestamp, 0 /* level */, 1 /* count */);
+ bigramProbability, HistoricalInfo(timestamp, 0 /* level */, 1 /* count */));
const PrevWordsInfo prevWordsInfo(word0CodePoints, word0Length,
false /* isBeginningOfSentence */);
dictionary->addNgramEntry(&prevWordsInfo, &ngramProperty);