/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/pt_common/ |
dynamic_pt_gc_event_listeners.cpp | 28 ::onVisitingPtNode(const PtNodeParams *const ptNodeParams) { 31 bool isUselessPtNode = !ptNodeParams->isTerminal(); 32 if (ptNodeParams->isTerminal() && !ptNodeParams->representsNonWordInfo()) { 35 ptNodeParams, &needsToKeepPtNode)) { 45 } else if (ptNodeParams->isTerminal()) { 47 if (!mPtNodeWriter->updateChildrenPosition(ptNodeParams, 54 if (!mPtNodeWriter->markPtNodeAsDeleted(ptNodeParams)) { 59 if (ptNodeParams->isTerminal() && !ptNodeParams->representsNonWordInfo()) [all...] |
dynamic_pt_reading_helper.cpp | 30 const PtNodeParams *const ptNodeParams) { 31 if (ptNodeParams->isTerminal() && !ptNodeParams->isDeleted()) { 32 mTerminalPositions->push_back(ptNodeParams->getHeadPos()); 49 const PtNodeParams ptNodeParams(getPtNodeParams()); 50 if (!ptNodeParams.isValid()) { 54 if (ptNodeParams.hasChildren()) { 56 if (!listener->onDescend(ptNodeParams.getChildrenPos())) [all...] |
pt_node_params.h | 32 class PtNodeParams { 35 PtNodeParams() : mHeadPos(NOT_A_DICT_POS), mFlags(0), mHasMovedFlag(false), 43 PtNodeParams(const PtNodeParams& ptNodeParams) 44 : mHeadPos(ptNodeParams.mHeadPos), mFlags(ptNodeParams.mFlags), 45 mHasMovedFlag(ptNodeParams.mHasMovedFlag), mParentPos(ptNodeParams.mParentPos), 46 mCodePointCount(ptNodeParams.mCodePointCount), mCodePoints() [all...] |
dynamic_pt_reading_helper.h | 52 virtual bool onVisitingPtNode(const PtNodeParams *const node) = 0; 68 bool onVisitingPtNode(const PtNodeParams *const ptNodeParams); 124 AK_FORCE_INLINE const PtNodeParams getPtNodeParams() const { 126 return PtNodeParams(); 131 AK_FORCE_INLINE bool isValidTerminalNode(const PtNodeParams &ptNodeParams) const { 132 return !isEnd() && !ptNodeParams.isDeleted() && ptNodeParams.isTerminal(); 135 AK_FORCE_INLINE bool isMatchedCodePoint(const PtNodeParams &ptNodeParams, const int index [all...] |
dynamic_pt_updating_helper.cpp | 36 const PtNodeParams ptNodeParams(readingHelper->getPtNodeParams()); 37 if (!ptNodeParams.isValid()) { 41 if (!readingHelper->isMatchedCodePoint(ptNodeParams, 0 /* index */, 45 readingHelper->readNextSiblingNode(ptNodeParams); 49 const size_t nodeCodePointCount = ptNodeParams.getCodePointArrayView().size(); 53 || !readingHelper->isMatchedCodePoint(ptNodeParams, j, 56 return reallocatePtNodeAndAddNewPtNodes(&ptNodeParams, j, unigramProperty, 61 if (wordCodePoints.size() == readingHelper->getTotalCodePointCount(ptNodeParams)) { 62 return setPtNodeProbability(&ptNodeParams, unigramProperty, outAddedNewUnigram) [all...] |
dynamic_pt_gc_event_listeners.h | 29 class PtNodeParams; 63 bool onVisitingPtNode(const PtNodeParams *const ptNodeParams); 94 bool onVisitingPtNode(const PtNodeParams *const ptNodeParams); 123 bool onVisitingPtNode(const PtNodeParams *const ptNodeParams); 150 bool onVisitingPtNode(const PtNodeParams *const ptNodeParams);
|
pt_node_writer.h | 50 virtual bool markPtNodeAsDeleted(const PtNodeParams *const toBeUpdatedPtNodeParams) = 0; 52 virtual bool markPtNodeAsMoved(const PtNodeParams *const toBeUpdatedPtNodeParams, 56 const PtNodeParams *const toBeUpdatedPtNodeParams) = 0; 58 virtual bool updatePtNodeUnigramProperty(const PtNodeParams *const toBeUpdatedPtNodeParams, 62 const PtNodeParams *const toBeUpdatedPtNodeParams, 65 virtual bool updateChildrenPosition(const PtNodeParams *const toBeUpdatedPtNodeParams, 68 virtual bool writePtNodeAndAdvancePosition(const PtNodeParams *const ptNodeParams, 71 virtual bool writeNewTerminalPtNodeAndAdvancePosition(const PtNodeParams *const ptNodeParams, [all...] |
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/ |
ver4_patricia_trie_node_writer.cpp | 46 const PtNodeParams *const toBeUpdatedPtNodeParams) { 75 const PtNodeParams *const toBeUpdatedPtNodeParams, 104 const PtNodeParams childPtNodeParams(mReadingHelper.getPtNodeParams()); 121 const PtNodeParams *const toBeUpdatedPtNodeParams) { 147 const PtNodeParams *const toBeUpdatedPtNodeParams, 164 const PtNodeParams *const toBeUpdatedPtNodeParams, bool *const outNeedsToKeepPtNode) { 199 const PtNodeParams *const toBeUpdatedPtNodeParams, const int newChildrenPosition) { 205 bool Ver4PatriciaTrieNodeWriter::updateTerminalId(const PtNodeParams *const toBeUpdatedPtNodeParams, 212 const PtNodeParams *const ptNodeParams, int *const ptNodeWritingPos) [all...] |
ver4_patricia_trie_node_writer.h | 70 virtual bool markPtNodeAsDeleted(const PtNodeParams *const toBeUpdatedPtNodeParams); 72 virtual bool markPtNodeAsMoved(const PtNodeParams *const toBeUpdatedPtNodeParams, 76 const PtNodeParams *const toBeUpdatedPtNodeParams); 78 virtual bool updatePtNodeUnigramProperty(const PtNodeParams *const toBeUpdatedPtNodeParams, 82 const PtNodeParams *const toBeUpdatedPtNodeParams, bool *const outNeedsToKeepPtNode); 84 virtual bool updateChildrenPosition(const PtNodeParams *const toBeUpdatedPtNodeParams, 87 bool updateTerminalId(const PtNodeParams *const toBeUpdatedPtNodeParams, 90 virtual bool writePtNodeAndAdvancePosition(const PtNodeParams *const ptNodeParams, 93 virtual bool writeNewTerminalPtNodeAndAdvancePosition(const PtNodeParams *const ptNodeParams [all...] |
ver4_patricia_trie_policy.cpp | 65 const PtNodeParams ptNodeParams = readingHelper.getPtNodeParams(); 66 if (!ptNodeParams.isValid()) { 69 bool isTerminal = ptNodeParams.isTerminal() && !ptNodeParams.isDeleted(); 74 isTerminal = ptNodeParams.getProbability() != NOT_A_PROBABILITY; 76 readingHelper.readNextSiblingNode(ptNodeParams); 77 if (ptNodeParams.representsNonWordInfo()) { 81 const int wordId = isTerminal ? ptNodeParams.getHeadPos() : NOT_A_WORD_ID; 82 childDicNodes->pushLeavingChild(dicNode, ptNodeParams.getChildrenPos() [all...] |
ver4_patricia_trie_writing_helper.cpp | 229 const PtNodeParams ptNodeParams = 231 if (ptNodeParams.representsNonWordInfo()) { 234 if (!ptNodeWriter->markPtNodeAsWillBecomeNonTerminal(&ptNodeParams)) { 288 ::onVisitingPtNode(const PtNodeParams *const ptNodeParams) { 289 if (!ptNodeParams->isTerminal()) { 293 mTerminalIdMap->find(ptNodeParams->getTerminalId()); 296 ptNodeParams->getTerminalId(), mTerminalIdMap->size()); 299 if (!mPtNodeWriter->updateTerminalId(ptNodeParams, it->second)) [all...] |
ver4_patricia_trie_writing_helper.h | 73 bool onVisitingPtNode(const PtNodeParams *const ptNodeParams);
|
ver4_patricia_trie_policy.h | 174 const PtNodeParams &ptNodeParams) const;
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/ |
ver4_patricia_trie_node_writer.cpp | 36 const PtNodeParams *const toBeUpdatedPtNodeParams) { 66 const PtNodeParams *const toBeUpdatedPtNodeParams, 95 const PtNodeParams childPtNodeParams(mReadingHelper.getPtNodeParams()); 112 const PtNodeParams *const toBeUpdatedPtNodeParams) { 138 const PtNodeParams *const toBeUpdatedPtNodeParams, 151 const PtNodeParams *const toBeUpdatedPtNodeParams, bool *const outNeedsToKeepPtNode) { 172 const PtNodeParams *const toBeUpdatedPtNodeParams, const int newChildrenPosition) { 178 bool Ver4PatriciaTrieNodeWriter::updateTerminalId(const PtNodeParams *const toBeUpdatedPtNodeParams, 185 const PtNodeParams *const ptNodeParams, int *const ptNodeWritingPos) [all...] |
ver4_patricia_trie_node_writer.h | 49 virtual bool markPtNodeAsDeleted(const PtNodeParams *const toBeUpdatedPtNodeParams); 51 virtual bool markPtNodeAsMoved(const PtNodeParams *const toBeUpdatedPtNodeParams, 55 const PtNodeParams *const toBeUpdatedPtNodeParams); 57 virtual bool updatePtNodeUnigramProperty(const PtNodeParams *const toBeUpdatedPtNodeParams, 61 const PtNodeParams *const toBeUpdatedPtNodeParams, bool *const outNeedsToKeepPtNode); 63 virtual bool updateChildrenPosition(const PtNodeParams *const toBeUpdatedPtNodeParams, 66 bool updateTerminalId(const PtNodeParams *const toBeUpdatedPtNodeParams, 69 virtual bool writePtNodeAndAdvancePosition(const PtNodeParams *const ptNodeParams, 72 virtual bool writeNewTerminalPtNodeAndAdvancePosition(const PtNodeParams *const ptNodeParams [all...] |
ver4_patricia_trie_writing_helper.cpp | 167 ::onVisitingPtNode(const PtNodeParams *const ptNodeParams) { 168 if (!ptNodeParams->isTerminal()) { 172 mTerminalIdMap->find(ptNodeParams->getTerminalId()); 175 ptNodeParams->getTerminalId(), mTerminalIdMap->size()); 178 if (!mPtNodeWriter->updateTerminalId(ptNodeParams, it->second)) {
|
ver4_patricia_trie_policy.cpp | 56 const PtNodeParams ptNodeParams = readingHelper.getPtNodeParams(); 57 if (!ptNodeParams.isValid()) { 60 const bool isTerminal = ptNodeParams.isTerminal() && !ptNodeParams.isDeleted(); 61 const int wordId = isTerminal ? ptNodeParams.getTerminalId() : NOT_A_WORD_ID; 62 childDicNodes->pushLeavingChild(dicNode, ptNodeParams.getChildrenPos(), 63 wordId, ptNodeParams.getCodePointArrayView()); 64 readingHelper.readNextSiblingNode(ptNodeParams); 100 const PtNodeParams ptNodeParams = mNodeReader.fetchPtNodeParamsInBufferFromPtNodePos(ptNodePos) [all...] |
ver4_patricia_trie_writing_helper.h | 60 bool onVisitingPtNode(const PtNodeParams *const ptNodeParams);
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v2/ |
patricia_trie_policy.cpp | 300 const PtNodeParams ptNodeParams = 304 prevWordIds, wordId, ptNodeParams.getProbability()); 305 return getWordAttributes(probability, ptNodeParams); 310 return getWordAttributes(bigramProbability, ptNodeParams); 313 return getWordAttributes(getProbability(ptNodeParams.getProbability(), NOT_A_PROBABILITY), 314 ptNodeParams); 318 const PtNodeParams &ptNodeParams) const { 319 return WordAttributes(probability, false /* isBlacklisted */, ptNodeParams.isNotAWord() [all...] |
patricia_trie_policy.h | 176 const PtNodeParams &ptNodeParams) const;
|