Home
last modified time | relevance | path

Searched refs:probability (Results 1 – 25 of 56) sorted by relevance

123

/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DBinaryDictionaryTests.java146 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/property/
Dunigram_property.h31 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/v4/content/
Dshortcut_dict_content.cpp106 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 …]
Dshortcut_dict_content.h67 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;
Ddynamic_language_model_probability_utils.h38 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()
Dprobability_entry.h43 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/structure/backward/v402/content/
Dshortcut_dict_content.cpp121 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 …]
Dprobability_entry.h46 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()
Dbigram_entry.h42 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()
Dshortcut_dict_content.h74 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;
Dbigram_dict_content.cpp47 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/v4/shortcut/
Dver4_shortcut_list_policy.h44 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/backward/v402/shortcut/
Dver4_shortcut_list_policy.h54 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/pt_common/
Dpt_node_params.h61 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/
Dver4_patricia_trie_policy.cpp127 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 …]
Dver4_patricia_trie_node_reader.cpp67 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/java/src/com/android/inputmethod/latin/makedict/
DWeightedString.java32 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()
DProbabilityInfo.java47 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/tests/dictionary/structure/v4/content/
Dlanguage_model_dict_content_test.cpp33 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()
Dprobability_entry_test.cpp28 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/native/jni/src/dictionary/structure/v2/
Dpatricia_trie_policy.cpp303 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()
Dver2_patricia_trie_node_reader.cpp35 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/modules/Wifi/service/java/com/android/server/wifi/util/
DIntHistogram.java153 public double quantileFunction(double probability, int minimum, int maximum) { in quantileFunction() argument
157 if (probability < 0.0 || probability > 1.0) { in quantileFunction()
164 final double target = sum * probability; in quantileFunction()
176 return minimum + probability * (maximum - minimum); in quantileFunction()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/
Dprobability_utils.h55 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/modules/NeuralNetworks/common/
DAidlValidateHal.cpp59 NN_RET_CHECK_GT(role.probability, 0.0f); in validateMemoryDesc()
60 NN_RET_CHECK_LE(role.probability, 1.0f); in validateMemoryDesc()
73 NN_RET_CHECK_GT(role.probability, 0.0f); in validateMemoryDesc()
74 NN_RET_CHECK_LE(role.probability, 1.0f); in validateMemoryDesc()

123