Home
last modified time | relevance | path

Searched refs:NgramType (Results 1 – 9 of 9) sorted by relevance

/packages/inputmethods/LatinIME/native/jni/src/utils/
Dngram_utils.h24 enum class NgramType : int { enum
36 const NgramType ASCENDING[] = {
37 NgramType::Unigram, NgramType::Bigram, NgramType::Trigram
40 const NgramType DESCENDING[] = {
41 NgramType::Trigram, NgramType::Bigram, NgramType::Unigram
49 static AK_FORCE_INLINE NgramType getNgramTypeFromWordCount(const int wordCount) { in getNgramTypeFromWordCount()
52 return NgramType::NotANgramType; in getNgramTypeFromWordCount()
55 return static_cast<NgramType>(wordCount - 1); in getNgramTypeFromWordCount()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/
Dentry_counters.h35 int getNgramCount(const NgramType ngramType) const { in getNgramCount()
65 void incrementNgramCount(const NgramType ngramType) { in incrementNgramCount()
69 void decrementNgramCount(const NgramType ngramType) { in decrementNgramCount()
73 int getNgramCount(const NgramType ngramType) const { in getNgramCount()
77 void setNgramCount(const NgramType ngramType, const int count) { in setNgramCount()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/
Dver4_patricia_trie_writing_helper.cpp56 "extendedRegionSize: %d", false, entryCounts.getNgramCount(NgramType::Unigram), in writeToDictFile()
57 entryCounts.getNgramCount(NgramType::Bigram), extendedRegionSize); in writeToDictFile()
77 entryCounters.setNgramCount(NgramType::Unigram, unigramCount); in writeToDictFileWithGC()
78 entryCounters.setNgramCount(NgramType::Bigram, bigramCount); in writeToDictFileWithGC()
112 const int maxUnigramCount = headerPolicy->getMaxNgramCounts().getNgramCount(NgramType::Unigram); in runGC()
129 const int maxBigramCount = headerPolicy->getMaxNgramCounts().getNgramCount(NgramType::Bigram); in runGC()
Dver4_patricia_trie_policy.cpp306 mEntryCounters.incrementNgramCount(NgramType::Unigram); in addUnigramEntry()
400 mEntryCounters.incrementNgramCount(NgramType::Bigram); in addNgramEntry()
441 mEntryCounters.decrementNgramCount(NgramType::Bigram); in removeNgramEntry()
529 mEntryCounters.getNgramCount(NgramType::Unigram)); in getProperty()
531 snprintf(outResult, maxResultLength, "%d", mEntryCounters.getNgramCount(NgramType::Bigram)); in getProperty()
537 NgramType::Unigram)) : in getProperty()
544 NgramType::Bigram)) : in getProperty()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/
Dver4_patricia_trie_policy.cpp219 mEntryCounters.incrementNgramCount(NgramType::Unigram); in addUnigramEntry()
267 mEntryCounters.decrementNgramCount(NgramType::Unigram); in removeUnigramEntry()
484 mEntryCounters.getNgramCount(NgramType::Unigram)); in getProperty()
486 snprintf(outResult, maxResultLength, "%d", mEntryCounters.getNgramCount(NgramType::Bigram)); in getProperty()
492 NgramType::Unigram)) : in getProperty()
499 NgramType::Bigram)) : in getProperty()
Dver4_patricia_trie_writing_helper.cpp47 "extendedRegionSize: %d", false, entryCounts.getNgramCount(NgramType::Unigram), in writeToDictFile()
48 entryCounts.getNgramCount(NgramType::Bigram), in writeToDictFile()
49 entryCounts.getNgramCount(NgramType::Trigram), in writeToDictFile()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/content/
Ddynamic_language_model_probability_utils.h32 const NgramType ngramType) { in computeRawProbabilityFromCounts()
37 static float backoff(const int ngramProbability, const NgramType ngramType) { in backoff()
Dlanguage_model_dict_content.cpp93 const NgramType ngramType = NgramUtils::getNgramTypeFromWordCount(i + 1); in getWordAttributes()
203 const NgramType ngramType = NgramUtils::getNgramTypeFromWordCount(totalWordCount); in truncateEntries()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/header/
Dheader_policy.cpp128 int getIndexFromNgramType(const NgramType ngramType) { in getIndexFromNgramType()