/packages/inputmethods/LatinIME/native/jni/src/suggest/core/ |
D | suggest.cpp | 122 DicNode dicNode; in expandCurrentDicNodes() local 123 traverseSession->getDicTraverseCache()->popActive(&dicNode); in expandCurrentDicNodes() 124 if (dicNode.isTotalInputSizeExceedingLimit()) { in expandCurrentDicNodes() 128 const int point0Index = dicNode.getInputIndex(0); in expandCurrentDicNodes() 130 TRAVERSAL->canDoLookAheadCorrection(traverseSession, &dicNode); in expandCurrentDicNodes() 134 const bool isCompletion = dicNode.isCompletion(inputSize); in expandCurrentDicNodes() 137 TRAVERSAL->shouldNodeLevelCache(traverseSession, &dicNode); in expandCurrentDicNodes() 140 dicNode.dump("PUSH_CACHE"); in expandCurrentDicNodes() 142 traverseSession->getDicTraverseCache()->copyPushContinue(&dicNode); in expandCurrentDicNodes() 143 dicNode.setCached(); in expandCurrentDicNodes() [all …]
|
D | suggest.h | 57 void createNextWordDicNode(DicTraverseSession *traverseSession, DicNode *dicNode, 61 void processTerminalDicNode(DicTraverseSession *traverseSession, DicNode *dicNode) const; 62 void processExpandedDicNode(DicTraverseSession *traverseSession, DicNode *dicNode) const; 63 void weightChildNode(DicTraverseSession *traverseSession, DicNode *dicNode) const; 64 void processDicNodeAsOmission(DicTraverseSession *traverseSession, DicNode *dicNode) const; 65 void processDicNodeAsDigraph(DicTraverseSession *traverseSession, DicNode *dicNode) const; 67 DicNode *dicNode) const; 68 void processDicNodeAsInsertion(DicTraverseSession *traverseSession, DicNode *dicNode) const; 70 DicNode *dicNode, DicNode *childDicNode) const; 71 void processDicNodeAsSubstitution(DicTraverseSession *traverseSession, DicNode *dicNode,
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/typing/ |
D | typing_weighting.h | 41 const DicNode *const dicNode) const { in getTerminalSpatialCost() argument 43 if (dicNode->hasMultipleWords()) { in getTerminalSpatialCost() 46 if (dicNode->getProximityCorrectionCount() > 0) { in getTerminalSpatialCost() 49 if (dicNode->getEditCorrectionCount() > 0) { in getTerminalSpatialCost() 55 float getOmissionCost(const DicNode *const parentDicNode, const DicNode *const dicNode) const { in getOmissionCost() argument 58 const bool sameCodePoint = dicNode->isSameNodeCodePoint(parentDicNode); in getOmissionCost() 60 const bool isFirstLetterOmission = dicNode->getNodeCodePointCount() == 2; in getOmissionCost() 76 const DicNode *const dicNode, DicNode_InputStateG *inputStateG) const { in getMatchedCost() argument 77 const int pointIndex = dicNode->getInputIndex(0); in getMatchedCost() 80 CharUtils::toBaseLowerCase(dicNode->getNodeCodePoint())); in getMatchedCost() [all …]
|
D | typing_traversal.h | 42 AK_FORCE_INLINE bool allowsErrorCorrections(const DicNode *const dicNode) const { in allowsErrorCorrections() argument 43 return dicNode->getNormalizedSpatialDistance() in allowsErrorCorrections() 48 const DicNode *const dicNode, const DicNode *const childDicNode, in isOmission() argument 61 if (dicNode->isCompletion(inputSize)) { in isOmission() 64 if (dicNode->canBeIntentionalOmission()) { in isOmission() 67 const int point0Index = dicNode->getInputIndex(0); in isOmission() 77 const DicTraverseSession *const traverseSession, const DicNode *const dicNode) const { in isSpaceSubstitutionTerminal() argument 88 if (!canDoLookAheadCorrection(traverseSession, dicNode)) { in isSpaceSubstitutionTerminal() 91 const int point0Index = dicNode->getInputIndex(0); in isSpaceSubstitutionTerminal() 92 return dicNode->isTerminalDicNode() in isSpaceSubstitutionTerminal() [all …]
|
D | typing_weighting.cpp | 29 const DicNode *const dicNode) const { in getErrorType() 32 if (isProximityDicNode(traverseSession, dicNode)) { in getErrorType() 34 } else if (dicNode->isInDigraph()) { in getErrorType() 41 dicNode->getInputIndex(0)); in getErrorType() 42 const int nodeCodePoint = dicNode->getNodeCodePoint(); in getErrorType()
|
D | typing_scoring.h | 106 const DicNode *const dicNode) const { in sameAsTyped() argument 108 dicNode->getOutputWordBuf(), dicNode->getNodeCodePointCount()); in sameAsTyped()
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/policy/ |
D | weighting.cpp | 77 const DicNode *const parentDicNode, DicNode *const dicNode, in addCostAndForwardInputIndex() argument 83 traverseSession, parentDicNode, dicNode, &inputStateG); in addCostAndForwardInputIndex() 85 traverseSession, parentDicNode, dicNode, multiBigramMap); in addCostAndForwardInputIndex() 87 traverseSession, parentDicNode, dicNode); in addCostAndForwardInputIndex() 88 profile(correctionType, dicNode); in addCostAndForwardInputIndex() 90 dicNode->updateInputIndexG(&inputStateG); in addCostAndForwardInputIndex() 92 dicNode->forwardInputIndex(0, getForwardInputCount(correctionType), in addCostAndForwardInputIndex() 95 dicNode->addCost(spatialCost, languageCost, weighting->needsToNormalizeCompoundDistance(), in addCostAndForwardInputIndex() 100 dicNode->saveNormalizedCompoundDistanceAfterFirstWordIfNoneYet(); in addCostAndForwardInputIndex() 106 const DicNode *const parentDicNode, const DicNode *const dicNode, in getSpatialCost() argument [all …]
|
D | weighting.h | 35 const DicNode *const parentDicNode, DicNode *const dicNode, 40 const DicNode *const dicNode) const = 0; 43 const DicNode *const parentDicNode, const DicNode *const dicNode) const = 0; 46 const DicTraverseSession *const traverseSession, const DicNode *const dicNode, 50 const DicNode *const dicNode) const = 0; 54 const DicNode *const dicNode) const = 0; 58 const DicNode *const parentDicNode, const DicNode *const dicNode) const = 0; 61 const DicNode *const dicNode, DicNode_InputStateG *const inputStateG) const = 0; 64 const DicTraverseSession *const traverseSession, const DicNode *const dicNode, 69 const DicNode *const dicNode) const = 0; [all …]
|
D | traversal.h | 29 virtual bool allowsErrorCorrections(const DicNode *const dicNode) const = 0; 31 const DicNode *const dicNode, const DicNode *const childDicNode, 34 const DicNode *const dicNode) const = 0; 36 const DicNode *const dicNode) const = 0; 39 const DicNode *const dicNode) const = 0; 41 const DicNode *const dicNode) const = 0; 43 const DicNode *const dicNode, const DicNode *const childDicNode) const = 0; 50 const DicNode *const parentDicNode, const DicNode *const dicNode) const = 0; 51 virtual bool isGoodToTraverseNextWord(const DicNode *const dicNode,
|
D | scoring.h | 44 const DicNode *const dicNode) const = 0;
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dicnode/ |
D | dic_node.cpp | 21 DicNode::DicNode(const DicNode &dicNode) in DicNode() argument 24 mProfiler(dicNode.mProfiler), in DicNode() 26 mDicNodeProperties(dicNode.mDicNodeProperties), mDicNodeState(dicNode.mDicNodeState), in DicNode() 27 mIsCachedForNextSuggestion(dicNode.mIsCachedForNextSuggestion) { in DicNode() 31 DicNode &DicNode::operator=(const DicNode &dicNode) { in operator =() argument 33 mProfiler = dicNode.mProfiler; in operator =() 35 mDicNodeProperties = dicNode.mDicNodeProperties; in operator =() 36 mDicNodeState = dicNode.mDicNodeState; in operator =() 37 mIsCachedForNextSuggestion = dicNode.mIsCachedForNextSuggestion; in operator =()
|
D | dic_node_utils.cpp | 50 /* static */ void DicNodeUtils::getAllChildDicNodes(const DicNode *dicNode, in getAllChildDicNodes() argument 53 if (dicNode->isTotalInputSizeExceedingLimit()) { in getAllChildDicNodes() 56 if (!dicNode->isLeavingNode()) { in getAllChildDicNodes() 57 childDicNodes->pushPassingChild(dicNode); in getAllChildDicNodes() 59 dictionaryStructurePolicy->createAndGetAllChildDicNodes(dicNode, childDicNodes); in getAllChildDicNodes() 71 const DicNode *const dicNode, MultiBigramMap *const multiBigramMap) { in getBigramNodeImprobability() argument 72 if (dicNode->hasMultipleWords() && !dicNode->isValidMultipleWordSuggestion()) { in getBigramNodeImprobability() 76 dicNode->getPrevWordIds(), dicNode->getWordId(), multiBigramMap); in getBigramNodeImprobability() 78 || (dicNode->hasMultipleWords() in getBigramNodeImprobability()
|
D | dic_node.h | 95 DicNode(const DicNode &dicNode); 96 DicNode &operator=(const DicNode &dicNode); 100 void initByCopy(const DicNode *const dicNode) { in initByCopy() argument 101 mIsCachedForNextSuggestion = dicNode->mIsCachedForNextSuggestion; in initByCopy() 102 mDicNodeProperties.initByCopy(&dicNode->mDicNodeProperties); in initByCopy() 103 mDicNodeState.initByCopy(&dicNode->mDicNodeState); in initByCopy() 104 PROF_NODE_COPY(&dicNode->mProfiler, mProfiler); in initByCopy() 116 void initAsRootWithPreviousWord(const DicNode *const dicNode, const int rootPtNodeArrayPos) { in initAsRootWithPreviousWord() argument 117 mIsCachedForNextSuggestion = dicNode->mIsCachedForNextSuggestion; in initAsRootWithPreviousWord() 119 newPrevWordIds[0] = dicNode->mDicNodeProperties.getWordId(); in initAsRootWithPreviousWord() [all …]
|
D | dic_node_pool.h | 44 for (auto &dicNode : mDicNodes) { in reset() 45 mPooledDicNodes.emplace_back(&dicNode); in reset() 54 DicNode *const dicNode = mPooledDicNodes.back(); in getInstance() local 56 return dicNode; in getInstance() 61 void placeBackInstance(DicNode *dicNode) { in placeBackInstance() argument 62 mPooledDicNodes.emplace_back(dicNode); in placeBackInstance() 68 for (const auto &dicNode : mDicNodes) { in dump() local 69 usedDicNodes.insert(&dicNode); in dump()
|
D | dic_nodes_cache.h | 88 AK_FORCE_INLINE void copyPushTerminal(DicNode *dicNode) { in copyPushTerminal() argument 89 mTerminalDicNodes->copyPush(dicNode); in copyPushTerminal() 92 AK_FORCE_INLINE void copyPushActive(DicNode *dicNode) { in copyPushActive() argument 93 mActiveDicNodes->copyPush(dicNode); in copyPushActive() 96 AK_FORCE_INLINE void copyPushContinue(DicNode *dicNode) { in copyPushContinue() argument 97 mCachedDicNodesForContinuousSuggestion->copyPush(dicNode); in copyPushContinue() 100 AK_FORCE_INLINE void copyPushNextActive(DicNode *dicNode) { in copyPushNextActive() argument 101 mNextActiveDicNodes->copyPush(dicNode); in copyPushNextActive()
|
D | dic_node_priority_queue.h | 64 AK_FORCE_INLINE void copyPush(const DicNode *const dicNode) { in copyPush() argument 65 DicNode *const pooledDicNode = newDicNode(dicNode); in copyPush() 118 AK_FORCE_INLINE bool betterThanWorstDicNode(const DicNode *const dicNode) const { in betterThanWorstDicNode() argument 123 return compareDicNode(dicNode, worstNode); in betterThanWorstDicNode() 126 AK_FORCE_INLINE DicNode *newDicNode(const DicNode *const dicNode) { in newDicNode() argument 129 DicNodeUtils::initByCopy(dicNode, newNode); in newDicNode()
|
D | dic_node_vector.h | 56 void pushPassingChild(const DicNode *dicNode) { in pushPassingChild() argument 59 mDicNodes.back().initAsPassingChild(dicNode); in pushPassingChild() 62 void pushLeavingChild(const DicNode *const dicNode, const int childrenPtNodeArrayPos, in pushLeavingChild() argument 66 mDicNodes.back().initAsChild(dicNode, childrenPtNodeArrayPos, wordId, mergedCodePoints); in pushLeavingChild()
|
D | dic_node_utils.h | 39 static void getAllChildDicNodes(const DicNode *dicNode, 44 const DicNode *const dicNode, MultiBigramMap *const multiBigramMap);
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dictionary/ |
D | dictionary_utils.cpp | 46 for (const DicNode &dicNode : current) { in getMaxProbabilityOfExactMatches() local 47 if (dicNode.isInDigraph() && dicNode.getNodeCodePoint() == baseLowerCodePoint) { in getMaxProbabilityOfExactMatches() 48 next.emplace_back(dicNode); in getMaxProbabilityOfExactMatches() 52 processChildDicNodes(dictionaryStructurePolicy, baseLowerCodePoint, &dicNode, &next); in getMaxProbabilityOfExactMatches() 59 for (const DicNode &dicNode : current) { in getMaxProbabilityOfExactMatches() local 60 if (!dicNode.isTerminalDicNode()) { in getMaxProbabilityOfExactMatches() 64 dictionaryStructurePolicy->getWordAttributesInContext(dicNode.getPrevWordIds(), in getMaxProbabilityOfExactMatches() 65 dicNode.getWordId(), nullptr /* multiBigramMap */); in getMaxProbabilityOfExactMatches()
|
/packages/inputmethods/LatinIME/native/jni/tests/suggest/core/dicnode/ |
D | dic_node_pool_test.cpp | 38 DicNode *const dicNode = dicNodePool.getInstance(); in TEST() local 39 EXPECT_NE(nullptr, dicNode); in TEST() 41 dicNodePool.placeBackInstance(dicNode); in TEST() 42 EXPECT_EQ(dicNode, dicNodePool.getInstance()); in TEST()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v2/ |
D | patricia_trie_policy.cpp | 33 void PatriciaTriePolicy::createAndGetAllChildDicNodes(const DicNode *const dicNode, in createAndGetAllChildDicNodes() argument 35 if (!dicNode->hasChildren()) { in createAndGetAllChildDicNodes() 38 int nextPos = dicNode->getChildrenPtNodeArrayPos(); in createAndGetAllChildDicNodes() 56 nextPos = createAndGetLeavingChildNode(dicNode, nextPos, childDicNodes); in createAndGetAllChildDicNodes() 402 int PatriciaTriePolicy::createAndGetLeavingChildNode(const DicNode *const dicNode, in createAndGetLeavingChildNode() argument 420 childDicNodes->pushLeavingChild(dicNode, childrenPos, wordId, in createAndGetLeavingChildNode()
|
D | patricia_trie_policy.h | 59 void createAndGetAllChildDicNodes(const DicNode *const dicNode, 171 int createAndGetLeavingChildNode(const DicNode *const dicNode, const int ptNodePos,
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/session/ |
D | dic_traverse_session.h | 109 ProximityType getProximityTypeG(const DicNode *const dicNode, const int childCodePoint) const { in getProximityTypeG() argument 115 const int pointerId = dicNode->getInputIndex(i); in getProximityTypeG()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/ |
D | ver4_patricia_trie_policy.cpp | 48 void Ver4PatriciaTriePolicy::createAndGetAllChildDicNodes(const DicNode *const dicNode, in createAndGetAllChildDicNodes() argument 50 if (!dicNode->hasChildren()) { in createAndGetAllChildDicNodes() 54 readingHelper.initWithPtNodeArrayPos(dicNode->getChildrenPtNodeArrayPos()); in createAndGetAllChildDicNodes() 62 childDicNodes->pushLeavingChild(dicNode, ptNodeParams.getChildrenPos(), in createAndGetAllChildDicNodes()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/ |
D | ver4_patricia_trie_policy.cpp | 57 void Ver4PatriciaTriePolicy::createAndGetAllChildDicNodes(const DicNode *const dicNode, in createAndGetAllChildDicNodes() argument 59 if (!dicNode->hasChildren()) { in createAndGetAllChildDicNodes() 63 readingHelper.initWithPtNodeArrayPos(dicNode->getChildrenPtNodeArrayPos()); in createAndGetAllChildDicNodes() 82 childDicNodes->pushLeavingChild(dicNode, ptNodeParams.getChildrenPos(), in createAndGetAllChildDicNodes()
|