Home
last modified time | relevance | path

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

/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v2/
Dpatricia_trie_policy.cpp85 const int ptNodePos = getTerminalPtNodePosFromWordId(wordId); in getCodePointsAndProbabilityAndReturnCodePointCount() local
122 if (ptNodePos == startPos) { in getCodePointsAndProbabilityAndReturnCodePointCount()
169 if (childrenPos > ptNodePos) { in getCodePointsAndProbabilityAndReturnCodePointCount()
284 const int ptNodePos = readingHelper.getTerminalPtNodePositionOfWord(wordCodePoints.data(), in getWordId() local
290 return getWordIdFromTerminalPtNodePos(ptNodePos); in getWordId()
299 const int ptNodePos = getTerminalPtNodePosFromWordId(wordId); in getWordAttributesInContext() local
301 mPtNodeReader.fetchPtNodeParamsInBufferFromPtNodePos(ptNodePos); in getWordAttributesInContext()
344 const int ptNodePos = getTerminalPtNodePosFromWordId(wordId); in getProbabilityOfWord() local
346 mPtNodeReader.fetchPtNodeParamsInBufferFromPtNodePos(ptNodePos); in getProbabilityOfWord()
358 if (bigramsIt.getBigramPos() == ptNodePos in getProbabilityOfWord()
[all …]
Dver2_patricia_trie_node_reader.cpp24 const int ptNodePos) const { in fetchPtNodeParamsInBufferFromPtNodePos()
25 if (ptNodePos < 0 || ptNodePos >= static_cast<int>(mBuffer.size())) { in fetchPtNodeParamsInBufferFromPtNodePos()
28 ptNodePos, mBuffer.size()); in fetchPtNodeParamsInBufferFromPtNodePos()
40 PatriciaTrieReadingUtils::readPtNodeInfo(mBuffer.data(), ptNodePos, mShortcutPolicy, in fetchPtNodeParamsInBufferFromPtNodePos()
48 return PtNodeParams(ptNodePos, flags, mergedNodeCodePointCount, mergedNodeCodePoints, in fetchPtNodeParamsInBufferFromPtNodePos()
Dpatricia_trie_policy.h169 int getShortcutPositionOfPtNode(const int ptNodePos) const;
170 int getBigramsPositionOfPtNode(const int ptNodePos) const;
171 int createAndGetLeavingChildNode(const DicNode *const dicNode, const int ptNodePos,
173 int getWordIdFromTerminalPtNodePos(const int ptNodePos) const;
Dver2_patricia_trie_node_reader.h41 virtual const PtNodeParams fetchPtNodeParamsInBufferFromPtNodePos(const int ptNodePos) const;
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/
Dver4_patricia_trie_policy.cpp94 const int ptNodePos = getTerminalPtNodePosFromWordId(wordId); in getCodePointsAndReturnCodePointCount() local
95 readingHelper.initWithPtNodePos(ptNodePos); in getCodePointsAndReturnCodePointCount()
109 const int ptNodePos = readingHelper.getTerminalPtNodePositionOfWord(wordCodePoints.data(), in getWordId() local
115 return getWordIdFromTerminalPtNodePos(ptNodePos); in getWordId()
124 const int ptNodePos = getTerminalPtNodePosFromWordId(wordId); in getWordAttributesInContext() local
125 const PtNodeParams ptNodeParams(mNodeReader.fetchPtNodeParamsInBufferFromPtNodePos(ptNodePos)); in getWordAttributesInContext()
165 const int ptNodePos = getTerminalPtNodePosFromWordId(wordId); in getProbabilityOfWord() local
166 const PtNodeParams ptNodeParams(mNodeReader.fetchPtNodeParamsInBufferFromPtNodePos(ptNodePos)); in getProbabilityOfWord()
186 if (bigramsIt.getBigramPos() == ptNodePos in getProbabilityOfWord()
242 int Ver4PatriciaTriePolicy::getShortcutPositionOfPtNode(const int ptNodePos) const { in getShortcutPositionOfPtNode()
[all …]
Dver4_patricia_trie_node_reader.cpp40 const int ptNodePos, const int siblingNodePos) const { in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() argument
41 if (ptNodePos < 0 || ptNodePos >= mBuffer->getTailPosition()) { in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
44 ptNodePos, mBuffer->getTailPosition()); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
48 const bool usesAdditionalBuffer = mBuffer->isInAdditionalBuffer(ptNodePos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
50 int pos = ptNodePos; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
51 const int headPos = ptNodePos; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
Dver4_patricia_trie_node_reader.h61 virtual const PtNodeParams fetchPtNodeParamsInBufferFromPtNodePos(const int ptNodePos) const { in fetchPtNodeParamsInBufferFromPtNodePos() argument
62 return fetchPtNodeInfoFromBufferAndProcessMovedPtNode(ptNodePos, in fetchPtNodeParamsInBufferFromPtNodePos()
73 const PtNodeParams fetchPtNodeInfoFromBufferAndProcessMovedPtNode(const int ptNodePos,
Dver4_patricia_trie_node_writer.cpp241 const int ptNodePos = in addNgramEntry() local
244 mPtNodeReader->fetchPtNodeParamsInBufferFromPtNodePos(ptNodePos); in addNgramEntry()
413 bool Ver4PatriciaTrieNodeWriter::updatePtNodeFlags(const int ptNodePos, in updatePtNodeFlags() argument
421 if (!DynamicPtWritingUtils::writeFlags(mTrieBuffer, nodeFlags, ptNodePos)) { in updatePtNodeFlags()
422 AKLOGE("Cannot write PtNode flags. flags: %x, pos: %d", nodeFlags, ptNodePos); in updatePtNodeFlags()
Dver4_patricia_trie_policy.h169 int getBigramsPositionOfPtNode(const int ptNodePos) const;
170 int getShortcutPositionOfPtNode(const int ptNodePos) const;
171 int getWordIdFromTerminalPtNodePos(const int ptNodePos) const;
Dver4_patricia_trie_writing_helper.cpp227 const int ptNodePos = priorityQueue.top().getDictPos(); in truncateUnigrams() local
230 ptNodeReader->fetchPtNodeParamsInBufferFromPtNodePos(ptNodePos); in truncateUnigrams()
235 AKLOGE("Cannot mark PtNode as willBecomeNonterminal. PtNode pos: %d", ptNodePos); in truncateUnigrams()
Dver4_patricia_trie_node_writer.h133 bool updatePtNodeFlags(const int ptNodePos, const bool isBlacklisted, const bool isNotAWord,
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/
Dver4_patricia_trie_node_reader.cpp31 const int ptNodePos, const int siblingNodePos) const { in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() argument
32 if (ptNodePos < 0 || ptNodePos >= mBuffer->getTailPosition()) { in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
35 ptNodePos, mBuffer->getTailPosition()); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
39 const bool usesAdditionalBuffer = mBuffer->isInAdditionalBuffer(ptNodePos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
41 int pos = ptNodePos; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
42 const int headPos = ptNodePos; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
Dver4_patricia_trie_policy.cpp75 const int ptNodePos = in getCodePointsAndReturnCodePointCount() local
77 readingHelper.initWithPtNodePos(ptNodePos); in getCodePointsAndReturnCodePointCount()
91 const int ptNodePos = readingHelper.getTerminalPtNodePositionOfWord(wordCodePoints.data(), in getWordId() local
97 if (ptNodePos == NOT_A_DICT_POS) { in getWordId()
100 const PtNodeParams ptNodeParams = mNodeReader.fetchPtNodeParamsInBufferFromPtNodePos(ptNodePos); in getWordId()
169 const int ptNodePos = in getShortcutPositionOfWord() local
171 const PtNodeParams ptNodeParams(mNodeReader.fetchPtNodeParamsInBufferFromPtNodePos(ptNodePos)); in getShortcutPositionOfWord()
256 const int ptNodePos = in removeUnigramEntry() local
258 const PtNodeParams ptNodeParams = mNodeReader.fetchPtNodeParamsInBufferFromPtNodePos(ptNodePos); in removeUnigramEntry()
260 AKLOGE("Cannot remove unigram. ptNodePos: %d", ptNodePos); in removeUnigramEntry()
Dver4_patricia_trie_node_reader.h41 virtual const PtNodeParams fetchPtNodeParamsInBufferFromPtNodePos(const int ptNodePos) const { in fetchPtNodeParamsInBufferFromPtNodePos() argument
42 return fetchPtNodeInfoFromBufferAndProcessMovedPtNode(ptNodePos, in fetchPtNodeParamsInBufferFromPtNodePos()
51 const PtNodeParams fetchPtNodeInfoFromBufferAndProcessMovedPtNode(const int ptNodePos,
Dver4_patricia_trie_node_writer.cpp340 bool Ver4PatriciaTrieNodeWriter::updatePtNodeFlags(const int ptNodePos, const bool isTerminal, in updatePtNodeFlags() argument
347 if (!DynamicPtWritingUtils::writeFlags(mTrieBuffer, nodeFlags, ptNodePos)) { in updatePtNodeFlags()
348 AKLOGE("Cannot write PtNode flags. flags: %x, pos: %d", nodeFlags, ptNodePos); in updatePtNodeFlags()
Dver4_patricia_trie_node_writer.h98 bool updatePtNodeFlags(const int ptNodePos, const bool isTerminal, const bool hasMultipleChars);
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/pt_common/
Ddynamic_pt_reading_utils.cpp48 const int ptNodePos) { in getParentPtNodePos() argument
52 return ptNodePos; in getParentPtNodePos()
54 return parentOffset + ptNodePos; in getParentPtNodePos()
Ddynamic_pt_reading_helper.h108 AK_FORCE_INLINE void initWithPtNodePos(const int ptNodePos) { in initWithPtNodePos() argument
109 if (ptNodePos == NOT_A_DICT_POS) { in initWithPtNodePos()
113 mReadingState.mPos = ptNodePos; in initWithPtNodePos()
Dpatricia_trie_reading_utils.cpp136 /* static */ void PtReadingUtils::readPtNodeInfo(const uint8_t *const dictBuf, const int ptNodePos, in readPtNodeInfo() argument
142 int readingPos = ptNodePos; in readPtNodeInfo()
Dpt_node_reader.h31 const int ptNodePos) const = 0;
Ddynamic_pt_reading_utils.h42 static int getParentPtNodePos(const int parentOffset, const int ptNodePos);
Dpatricia_trie_reading_utils.h108 static void readPtNodeInfo(const uint8_t *const dictBuf, const int ptNodePos,
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
DBinaryDictIOUtils.java183 final int ptNodePos = dictDecoder.getPosition(); in getTerminalPosition() local
184 final PtNodeInfo currentInfo = dictDecoder.readPtNode(ptNodePos); in getTerminalPosition()
199 return currentInfo.isTerminal() ? ptNodePos : FormatSpec.NOT_VALID_WORD; in getTerminalPosition()
DAbstractDictDecoder.java87 public PtNodeInfo readPtNode(final int ptNodePos) { in readPtNode() argument
DDictDecoder.java49 public PtNodeInfo readPtNode(final int ptNodePos); in readPtNode() argument