/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
D | BinaryDictionaryTests.java | 146 final int probability = 100; in testConstructingDictionaryOnMemory() local 147 addUnigramWord(binaryDictionary, "word", probability); in testConstructingDictionaryOnMemory() 148 assertEquals(probability, binaryDictionary.getFrequency("word")); in testConstructingDictionaryOnMemory() 154 assertEquals(probability, binaryDictionary.getFrequency("word")); in testConstructingDictionaryOnMemory() 168 final int probability = 100; in testAddTooLongWord() local 169 addUnigramWord(binaryDictionary, "aaa", probability); in testAddTooLongWord() 170 addUnigramWord(binaryDictionary, validLongWord, probability); in testAddTooLongWord() 171 addUnigramWord(binaryDictionary, invalidLongWord, probability); in testAddTooLongWord() 173 binaryDictionary.addUnigramEntry("a", probability, false /* isBeginningOfSentence */, in testAddTooLongWord() 176 addUnigramWord(binaryDictionary, "abc", probability); in testAddTooLongWord() [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/content/ |
D | shortcut_dict_content.cpp | 106 int probability = 0; in copyShortcutListFromDictContent() local 109 codePoints, &codePointCount, &probability, &hasNext, &readingPos); in copyShortcutListFromDictContent() 110 if (!writeShortcutEntryAndAdvancePosition(codePoints, codePointCount, probability, in copyShortcutListFromDictContent() 119 bool ShortcutDictContent::setProbability(const int probability, const int shortcutEntryPos) { in setProbability() argument 124 const int shortcutFlagsToWrite = createAndGetShortcutFlags(probability, hasNext); in setProbability() 130 const int codePointCount, const int probability, const bool hasNext, in writeShortcutEntryAndAdvancePosition() argument 133 const int shortcutFlags = createAndGetShortcutFlags(probability, hasNext); in writeShortcutEntryAndAdvancePosition() 155 int probability = 0; in findShortcutEntryAndGetPos() local 158 &probability, &hasNext, &readingPos); in findShortcutEntryAndGetPos() 176 int ShortcutDictContent::createAndGetShortcutFlags(const int probability, in createAndGetShortcutFlags() argument [all …]
|
D | shortcut_dict_content.h | 67 bool setProbability(const int probability, const int shortcutEntryPos); 70 const int probability, const bool hasNext, const int shortcutEntryPos) { in writeShortcutEntry() argument 72 return writeShortcutEntryAndAdvancePosition(codePoint, codePointCount, probability, in writeShortcutEntry() 77 const int codePointCount, const int probability, const bool hasNext, 89 int createAndGetShortcutFlags(const int probability, const bool hasNext) const;
|
D | dynamic_language_model_probability_utils.h | 38 const int probability = in backoff() local 40 return std::min(std::max(probability, NOT_A_PROBABILITY), MAX_PROBABILITY); in backoff() 43 static int getDecayedProbability(const int probability, const HistoricalInfo historicalInfo) { in getDecayedProbability() argument 51 return probability; in getDecayedProbability()
|
D | probability_entry.h | 43 ProbabilityEntry(const int flags, const int probability) in ProbabilityEntry() argument 44 : mFlags(flags), mProbability(probability), mHistoricalInfo() {} in ProbabilityEntry() 138 const int probability = readFromEncodedEntry(encodedEntry, in decode() local 140 return ProbabilityEntry(flags, probability); in decode()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/property/ |
D | unigram_property.h | 31 ShortcutProperty(const std::vector<int> &&targetCodePoints, const int probability) in ShortcutProperty() argument 33 mProbability(probability) {} in ShortcutProperty() 58 const bool isPossiblyOffensive, const int probability, in UnigramProperty() argument 62 mIsPossiblyOffensive(isPossiblyOffensive), mProbability(probability), in UnigramProperty() 67 const bool isPossiblyOffensive, const int probability, in UnigramProperty() argument 71 mIsPossiblyOffensive(isPossiblyOffensive), mProbability(probability), in UnigramProperty() 76 const bool isBlacklisted, const bool isPossiblyOffensive, const int probability, in UnigramProperty() argument 80 mIsPossiblyOffensive(isPossiblyOffensive), mProbability(probability), in UnigramProperty() 85 const bool isBlacklisted, const bool isPossiblyOffensive, const int probability, in UnigramProperty() argument 89 mIsPossiblyOffensive(isPossiblyOffensive), mProbability(probability), in UnigramProperty()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/content/ |
D | shortcut_dict_content.cpp | 121 int probability = 0; in copyShortcutListFromDictContent() local 124 codePoints, &codePointCount, &probability, &hasNext, &readingPos); in copyShortcutListFromDictContent() 125 if (!writeShortcutEntryAndAdvancePosition(codePoints, codePointCount, probability, in copyShortcutListFromDictContent() 134 bool ShortcutDictContent::setProbability(const int probability, const int shortcutEntryPos) { in setProbability() argument 139 const int shortcutFlagsToWrite = createAndGetShortcutFlags(probability, hasNext); in setProbability() 145 const int codePointCount, const int probability, const bool hasNext, in writeShortcutEntryAndAdvancePosition() argument 148 const int shortcutFlags = createAndGetShortcutFlags(probability, hasNext); in writeShortcutEntryAndAdvancePosition() 170 int probability = 0; in findShortcutEntryAndGetPos() local 173 &probability, &hasNext, &readingPos); in findShortcutEntryAndGetPos() 191 int ShortcutDictContent::createAndGetShortcutFlags(const int probability, in createAndGetShortcutFlags() argument [all …]
|
D | probability_entry.h | 46 ProbabilityEntry(const int flags, const int probability) in ProbabilityEntry() argument 47 : mFlags(flags), mProbability(probability), mHistoricalInfo() {} in ProbabilityEntry() 50 ProbabilityEntry(const int flags, const int probability, in ProbabilityEntry() argument 52 : mFlags(flags), mProbability(probability), mHistoricalInfo(*historicalInfo) {} in ProbabilityEntry() 54 const ProbabilityEntry createEntryWithUpdatedProbability(const int probability) const { in createEntryWithUpdatedProbability() argument 55 return ProbabilityEntry(mFlags, probability, &mHistoricalInfo); in createEntryWithUpdatedProbability()
|
D | bigram_entry.h | 42 BigramEntry(const bool hasNext, const int probability, const int targetTerminalId) in BigramEntry() argument 43 : mHasNext(hasNext), mProbability(probability), mHistoricalInfo(), in BigramEntry() 47 BigramEntry(const bool hasNext, const int probability, in BigramEntry() argument 49 : mHasNext(hasNext), mProbability(probability), mHistoricalInfo(*historicalInfo), in BigramEntry() 64 const BigramEntry updateProbabilityAndGetEntry(const int probability) const { in updateProbabilityAndGetEntry() argument 65 return BigramEntry(mHasNext, probability, &mHistoricalInfo, mTargetTerminalId); in updateProbabilityAndGetEntry()
|
D | shortcut_dict_content.h | 74 bool setProbability(const int probability, const int shortcutEntryPos); 77 const int probability, const bool hasNext, const int shortcutEntryPos) { in writeShortcutEntry() argument 79 return writeShortcutEntryAndAdvancePosition(codePoint, codePointCount, probability, in writeShortcutEntry() 84 const int codePointCount, const int probability, const bool hasNext, 96 int createAndGetShortcutFlags(const int probability, const bool hasNext) const;
|
D | bigram_dict_content.cpp | 47 int probability = NOT_A_PROBABILITY; in getBigramEntryAndAdvancePosition() local 59 probability = bigramListBuffer->readUintAndAdvancePosition( in getBigramEntryAndAdvancePosition() 71 return BigramEntry(hasNext, probability, &historicalInfo, targetTerminalId); in getBigramEntryAndAdvancePosition() 73 return BigramEntry(hasNext, probability, targetTerminalId); in getBigramEntryAndAdvancePosition()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/shortcut/ |
D | ver4_shortcut_list_policy.h | 54 int probability = 0; in getNextShortcut() local 56 outCodePoint, outCodePointCount, &probability, outHasNext, pos); in getNextShortcut() 58 *outIsWhitelist = ShortcutListReadingUtils::isWhitelist(probability); in getNextShortcut() 67 const int probability) { in addNewShortcut() argument 76 return mShortcutDictContent->writeShortcutEntry(codePoints, codePointCount, probability, in addNewShortcut() 90 codePointCount, probability, true /* hasNext */, &writingPos)) { in addNewShortcut() 102 codePointCount, probability, hasNext, entryPos)) { in addNewShortcut()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/shortcut/ |
D | ver4_shortcut_list_policy.h | 44 int probability = 0; in getNextShortcut() local 46 outCodePoint, outCodePointCount, &probability, outHasNext, pos); in getNextShortcut() 48 *outIsWhitelist = ShortcutListReadingUtils::isWhitelist(probability); in getNextShortcut() 57 const int probability) { in addNewShortcut() argument 66 return mShortcutDictContent->writeShortcutEntry(codePoints, codePointCount, probability, in addNewShortcut() 80 codePointCount, probability, true /* hasNext */, &writingPos)) { in addNewShortcut() 92 codePointCount, probability, hasNext, entryPos)) { in addNewShortcut()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/pt_common/ |
D | pt_node_params.h | 61 const int codePointCount, const int *const codePoints, const int probability, in PtNodeParams() argument 67 mProbabilityFieldPos(NOT_A_DICT_POS), mProbability(probability), in PtNodeParams() 77 const int terminalIdFieldPos, const int terminalId, const int probability, in PtNodeParams() argument 82 mProbabilityFieldPos(NOT_A_DICT_POS), mProbability(probability), in PtNodeParams() 92 const CodePointArrayView codePoints, const int probability) in PtNodeParams() argument 98 mProbability(probability), in PtNodeParams() 109 const CodePointArrayView codePoints, const int probability) in PtNodeParams() argument 114 mProbabilityFieldPos(NOT_A_DICT_POS), mProbability(probability), in PtNodeParams()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/ |
D | ver4_patricia_trie_policy.cpp | 127 const int probability = multiBigramMap->getBigramProbability(this /* structurePolicy */, in getWordAttributesInContext() local 129 return getWordAttributes(probability, ptNodeParams); in getWordAttributesInContext() 132 const int probability = getProbabilityOfWord(prevWordIds, wordId); in getWordAttributesInContext() local 133 if (probability != NOT_A_PROBABILITY) { in getWordAttributesInContext() 134 return getWordAttributes(probability, ptNodeParams); in getWordAttributesInContext() 141 const WordAttributes Ver4PatriciaTriePolicy::getWordAttributes(const int probability, in getWordAttributes() argument 143 return WordAttributes(probability, false /* isBlacklisted */, ptNodeParams.isNotAWord(), in getWordAttributes() 457 const int probability = isValidWord ? DUMMY_PROBABILITY_FOR_VALID_WORDS : NOT_A_PROBABILITY; in updateEntriesForWordWithNgramContext() local 459 false /* isNotAWord */, false /*isBlacklisted*/, probability, historicalInfo); in updateEntriesForWordWithNgramContext() 465 ? NOT_A_PROBABILITY : probability; in updateEntriesForWordWithNgramContext() [all …]
|
D | ver4_patricia_trie_node_reader.cpp | 67 int probability = NOT_A_PROBABILITY; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() local 77 probability = ForgettingCurveUtils::decodeProbability( in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() 80 probability = probabilityEntry.getProbability(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() 103 terminalIdFieldPos, terminalId, probability, childrenPosFieldPos, childrenPos, in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v2/ |
D | patricia_trie_policy.cpp | 303 const int probability = multiBigramMap->getBigramProbability(this /* structurePolicy */, in getWordAttributesInContext() local 305 return getWordAttributes(probability, ptNodeParams); in getWordAttributesInContext() 317 const WordAttributes PatriciaTriePolicy::getWordAttributes(const int probability, in getWordAttributes() argument 319 return WordAttributes(probability, false /* isBlacklisted */, ptNodeParams.isNotAWord(), in getWordAttributes() 407 int probability = NOT_A_PROBABILITY; in createAndGetLeavingChildNode() local 415 mergedNodeCodePoints, &probability, &childrenPos, &shortcutPos, &bigramPos, in createAndGetLeavingChildNode() 450 const int probability = getProbability(word1Probability, bigramsIt.getProbability()); in getWordProperty() local 455 probability, HistoricalInfo()); in getWordProperty()
|
D | ver2_patricia_trie_node_reader.cpp | 35 int probability = NOT_A_PROBABILITY; in fetchPtNodeParamsInBufferFromPtNodePos() local 42 &probability, &childrenPos, &shortcutPos, &bigramPos, &siblingPos); in fetchPtNodeParamsInBufferFromPtNodePos() 49 probability, childrenPos, shortcutPos, bigramPos, siblingPos); in fetchPtNodeParamsInBufferFromPtNodePos()
|
/packages/inputmethods/LatinIME/native/jni/tests/dictionary/structure/v4/content/ |
D | language_model_dict_content_test.cpp | 33 const int probability = 10; in TEST() local 35 const ProbabilityEntry probabilityEntry(flag, probability); in TEST() 40 EXPECT_EQ(probability, entry.getProbability()); in TEST() 95 const int probability = 10; in TEST() local 102 const ProbabilityEntry probabilityEntry(flag, probability); in TEST()
|
D | probability_entry_test.cpp | 28 const int probability = 10; in TEST() local 30 const ProbabilityEntry entry(flag, probability); in TEST() 36 EXPECT_EQ(probability, decodedEntry.getProbability()); in TEST()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/makedict/ |
D | WeightedString.java | 32 public WeightedString(final String word, final int probability) { in WeightedString() argument 33 this(word, new ProbabilityInfo(probability)); in WeightedString() 46 public void setProbability(final int probability) { in setProbability() argument 47 mProbabilityInfo = new ProbabilityInfo(probability); in setProbability()
|
D | ProbabilityInfo.java | 47 public ProbabilityInfo(final int probability) { in ProbabilityInfo() argument 48 this(probability, BinaryDictionary.NOT_A_VALID_TIMESTAMP, 0, 0); in ProbabilityInfo() 51 public ProbabilityInfo(final int probability, final int timestamp, final int level, in ProbabilityInfo() argument 53 mProbability = probability; in ProbabilityInfo()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/ |
D | probability_utils.h | 55 const float probability = static_cast<float>(MAX_PROBABILITY) in encodeRawProbability() local 57 if (probability < 0.0f) { in encodeRawProbability() 60 return std::min(static_cast<int>(probability + 0.5f), MAX_PROBABILITY); in encodeRawProbability()
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/result/ |
D | suggestion_results.cpp | 52 const int probability) { in addPrediction() argument 53 if (probability == NOT_A_PROBABILITY) { in addPrediction() 57 addSuggestion(codePoints, codePointCount, probability, Dictionary::KIND_PREDICTION, in addPrediction()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | BinaryDictionary.java | 201 private static native boolean addUnigramEntryNative(long dict, int[] word, int probability, in addUnigramEntryNative() argument 207 int[] word, int probability, int timestamp); in addNgramEntryNative() argument 446 final String word, final int probability, final boolean isBeginningOfSentence, in addUnigramEntry() argument 452 if (!addUnigramEntryNative(mNativeDict, codePoints, probability, in addUnigramEntry() 476 final int probability, final int timestamp) { in addNgramEntry() argument 485 isBeginningOfSentenceArray, wordCodePoints, probability, timestamp)) { in addNgramEntry()
|