Searched refs:ngramType (Results 1 – 5 of 5) sorted by relevance
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/ |
D | entry_counters.h | 35 int getNgramCount(const NgramType ngramType) const { in getNgramCount() argument 36 return mEntryCounts[static_cast<int>(ngramType)]; in getNgramCount() 65 void incrementNgramCount(const NgramType ngramType) { in incrementNgramCount() argument 66 ++mEntryCounters[static_cast<int>(ngramType)]; in incrementNgramCount() 69 void decrementNgramCount(const NgramType ngramType) { in decrementNgramCount() argument 70 --mEntryCounters[static_cast<int>(ngramType)]; in decrementNgramCount() 73 int getNgramCount(const NgramType ngramType) const { in getNgramCount() argument 74 return mEntryCounters[static_cast<int>(ngramType)]; in getNgramCount() 77 void setNgramCount(const NgramType ngramType, const int count) { in setNgramCount() argument 78 mEntryCounters[static_cast<int>(ngramType)] = count; in setNgramCount()
|
D | forgetting_curve_utils.cpp | 130 for (const auto ngramType : AllNgramTypes::ASCENDING) { in needsToDecay() local 131 if (entryCounts.getNgramCount(ngramType) in needsToDecay() 132 >= getEntryCountHardLimit(maxNgramCounts.getNgramCount(ngramType))) { in needsToDecay()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/header/ |
D | header_policy.cpp | 128 int getIndexFromNgramType(const NgramType ngramType) { in getIndexFromNgramType() argument 129 return static_cast<int>(ngramType); in getIndexFromNgramType() 137 for (const auto ngramType : AllNgramTypes::ASCENDING) { in fillInHeader() local 139 NGRAM_COUNT_KEYS[getIndexFromNgramType(ngramType)], in fillInHeader() 140 entryCounts.getNgramCount(ngramType)); in fillInHeader() 164 for (const auto ngramType : AllNgramTypes::ASCENDING) { in readNgramCounts() local 166 NGRAM_COUNT_KEYS[getIndexFromNgramType(ngramType)], 0 /* defaultValue */); in readNgramCounts() 167 entryCounters.setNgramCount(ngramType, entryCount); in readNgramCounts() 174 for (const auto ngramType : AllNgramTypes::ASCENDING) { in readMaxNgramCounts() local 175 const int index = getIndexFromNgramType(ngramType); in readMaxNgramCounts() [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/content/ |
D | dynamic_language_model_probability_utils.h | 32 const NgramType ngramType) { in computeRawProbabilityFromCounts() argument 33 const int minCount = ASSUMED_MIN_COUNTS[static_cast<int>(ngramType)]; in computeRawProbabilityFromCounts() 37 static float backoff(const int ngramProbability, const NgramType ngramType) { in backoff() argument 39 ngramProbability + ENCODED_BACKOFF_WEIGHTS[static_cast<int>(ngramType)]; in backoff()
|
D | language_model_dict_content.cpp | 93 const NgramType ngramType = NgramUtils::getNgramTypeFromWordCount(i + 1); in getWordAttributes() local 96 historicalInfo->getCount(), contextCount, ngramType); in getWordAttributes() 103 decayedProbability, ngramType); in getWordAttributes() 203 const NgramType ngramType = NgramUtils::getNgramTypeFromWordCount(totalWordCount); in truncateEntries() local 204 if (currentEntryCounts.getNgramCount(ngramType) in truncateEntries() 205 <= maxEntryCounts.getNgramCount(ngramType)) { in truncateEntries() 206 outEntryCounters->setNgramCount(ngramType, in truncateEntries() 207 currentEntryCounts.getNgramCount(ngramType)); in truncateEntries() 212 maxEntryCounts.getNgramCount(ngramType), prevWordCount, &entryCount)) { in truncateEntries() 215 outEntryCounters->setNgramCount(ngramType, entryCount); in truncateEntries()
|