/packages/inputmethods/LatinIME/native/jni/src/suggest/core/ |
D | suggest.cpp | 119 DicNode dicNode; in expandCurrentDicNodes() local 120 traverseSession->getDicTraverseCache()->popActive(&dicNode); in expandCurrentDicNodes() 121 if (dicNode.isTotalInputSizeExceedingLimit()) { in expandCurrentDicNodes() 125 const int point0Index = dicNode.getInputIndex(0); in expandCurrentDicNodes() 127 TRAVERSAL->canDoLookAheadCorrection(traverseSession, &dicNode); in expandCurrentDicNodes() 131 const bool isCompletion = dicNode.isCompletion(inputSize); in expandCurrentDicNodes() 134 TRAVERSAL->shouldNodeLevelCache(traverseSession, &dicNode); in expandCurrentDicNodes() 137 dicNode.dump("PUSH_CACHE"); in expandCurrentDicNodes() 139 traverseSession->getDicTraverseCache()->copyPushContinue(&dicNode); in expandCurrentDicNodes() 140 dicNode.setCached(); in expandCurrentDicNodes() [all …]
|
D | suggest.h | 56 void createNextWordDicNode(DicTraverseSession *traverseSession, DicNode *dicNode, 60 void processTerminalDicNode(DicTraverseSession *traverseSession, DicNode *dicNode) const; 61 void processExpandedDicNode(DicTraverseSession *traverseSession, DicNode *dicNode) const; 62 void weightChildNode(DicTraverseSession *traverseSession, DicNode *dicNode) const; 63 void processDicNodeAsOmission(DicTraverseSession *traverseSession, DicNode *dicNode) const; 64 void processDicNodeAsDigraph(DicTraverseSession *traverseSession, DicNode *dicNode) const; 66 DicNode *dicNode) const; 67 void processDicNodeAsInsertion(DicTraverseSession *traverseSession, DicNode *dicNode) const; 69 DicNode *dicNode, DicNode *childDicNode) const; 70 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 | 41 AK_FORCE_INLINE bool allowsErrorCorrections(const DicNode *const dicNode) const { in allowsErrorCorrections() argument 42 return dicNode->getNormalizedSpatialDistance() in allowsErrorCorrections() 47 const DicNode *const dicNode, const DicNode *const childDicNode, in isOmission() argument 60 if (dicNode->isCompletion(inputSize)) { in isOmission() 63 if (dicNode->canBeIntentionalOmission()) { in isOmission() 66 const int point0Index = dicNode->getInputIndex(0); in isOmission() 76 const DicTraverseSession *const traverseSession, const DicNode *const dicNode) const { in isSpaceSubstitutionTerminal() argument 80 if (!canDoLookAheadCorrection(traverseSession, dicNode)) { in isSpaceSubstitutionTerminal() 83 const int point0Index = dicNode->getInputIndex(0); in isSpaceSubstitutionTerminal() 84 return dicNode->isTerminalDicNode() in isSpaceSubstitutionTerminal() [all …]
|
D | typing_weighting.cpp | 28 const DicNode *const dicNode) const { in getErrorType() 31 if (isProximityDicNode(traverseSession, dicNode)) { in getErrorType() 33 } else if (dicNode->isInDigraph()) { in getErrorType() 40 dicNode->getInputIndex(0)); in getErrorType() 41 const int nodeCodePoint = dicNode->getNodeCodePoint(); in getErrorType()
|
D | typing_scoring.h | 77 const DicNode *const dicNode) const { in sameAsTyped() argument 79 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) const = 0;
|
D | scoring.h | 42 const DicNode *const dicNode) const = 0;
|
D | dictionary_structure_with_buffer_policy.h | 47 virtual void createAndGetAllChildDicNodes(const DicNode *const dicNode,
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dicnode/ |
D | dic_node.h | 94 DicNode(const DicNode &dicNode); 95 DicNode &operator=(const DicNode &dicNode); 99 void initByCopy(const DicNode *const dicNode) { in initByCopy() argument 100 mIsCachedForNextSuggestion = dicNode->mIsCachedForNextSuggestion; in initByCopy() 101 mDicNodeProperties.initByCopy(&dicNode->mDicNodeProperties); in initByCopy() 102 mDicNodeState.initByCopy(&dicNode->mDicNodeState); in initByCopy() 103 PROF_NODE_COPY(&dicNode->mProfiler, mProfiler); in initByCopy() 115 void initAsRootWithPreviousWord(const DicNode *const dicNode, const int rootPtNodeArrayPos) { in initAsRootWithPreviousWord() argument 116 mIsCachedForNextSuggestion = dicNode->mIsCachedForNextSuggestion; in initAsRootWithPreviousWord() 118 newPrevWordsPtNodePos[0] = dicNode->mDicNodeProperties.getPtNodePos(); in initAsRootWithPreviousWord() [all …]
|
D | dic_node_utils.cpp | 51 /* static */ void DicNodeUtils::getAllChildDicNodes(const DicNode *dicNode, in getAllChildDicNodes() argument 54 if (dicNode->isTotalInputSizeExceedingLimit()) { in getAllChildDicNodes() 57 if (!dicNode->isLeavingNode()) { in getAllChildDicNodes() 58 childDicNodes->pushPassingChild(dicNode); in getAllChildDicNodes() 60 dictionaryStructurePolicy->createAndGetAllChildDicNodes(dicNode, childDicNodes); in getAllChildDicNodes() 72 const DicNode *const dicNode, MultiBigramMap *const multiBigramMap) { in getBigramNodeImprobability() argument 73 if (dicNode->hasMultipleWords() && !dicNode->isValidMultipleWordSuggestion()) { in getBigramNodeImprobability() 76 const int probability = getBigramNodeProbability(dictionaryStructurePolicy, dicNode, in getBigramNodeImprobability() 86 const DicNode *const dicNode, MultiBigramMap *const multiBigramMap) { in getBigramNodeProbability() argument 87 const int unigramProbability = dicNode->getProbability(); in getBigramNodeProbability() [all …]
|
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_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 | 55 void pushPassingChild(const DicNode *dicNode) { in pushPassingChild() argument 58 mDicNodes.back().initAsPassingChild(dicNode); in pushPassingChild() 61 void pushLeavingChild(const DicNode *const dicNode, const int ptNodePos, in pushLeavingChild() argument 67 mDicNodes.back().initAsChild(dicNode, ptNodePos, childrenPtNodeArrayPos, probability, in pushLeavingChild()
|
D | dic_node_utils.h | 38 static void getAllChildDicNodes(const DicNode *dicNode, 43 const DicNode *const dicNode, MultiBigramMap *const multiBigramMap); 52 const DicNode *const dicNode, MultiBigramMap *const multiBigramMap);
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dictionary/ |
D | dictionary_utils.cpp | 45 for (const DicNode &dicNode : current) { in getMaxProbabilityOfExactMatches() local 46 if (dicNode.isInDigraph() && dicNode.getNodeCodePoint() == codePoint) { in getMaxProbabilityOfExactMatches() 47 next.emplace_back(dicNode); in getMaxProbabilityOfExactMatches() 51 processChildDicNodes(dictionaryStructurePolicy, codePoint, &dicNode, &next); in getMaxProbabilityOfExactMatches() 58 for (const DicNode &dicNode : current) { in getMaxProbabilityOfExactMatches() local 59 if (!dicNode.isTerminalDicNode()) { in getMaxProbabilityOfExactMatches() 63 maxProbability = std::max(maxProbability, dicNode.getProbability()); in getMaxProbabilityOfExactMatches()
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/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() 355 int PatriciaTriePolicy::createAndGetLeavingChildNode(const DicNode *const dicNode, in createAndGetLeavingChildNode() argument 370 childDicNodes->pushLeavingChild(dicNode, ptNodePos, childrenPos, probability, in createAndGetLeavingChildNode()
|
D | patricia_trie_policy.h | 58 void createAndGetAllChildDicNodes(const DicNode *const dicNode, 163 int createAndGetLeavingChildNode(const DicNode *const dicNode, const int ptNodePos,
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ |
D | ver4_patricia_trie_policy.cpp | 45 void Ver4PatriciaTriePolicy::createAndGetAllChildDicNodes(const DicNode *const dicNode, in createAndGetAllChildDicNodes() argument 47 if (!dicNode->hasChildren()) { in createAndGetAllChildDicNodes() 51 readingHelper.initWithPtNodeArrayPos(dicNode->getChildrenPtNodeArrayPos()); in createAndGetAllChildDicNodes() 69 childDicNodes->pushLeavingChild(dicNode, ptNodeParams.getHeadPos(), in createAndGetAllChildDicNodes()
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v402/ |
D | ver4_patricia_trie_policy.cpp | 55 void Ver4PatriciaTriePolicy::createAndGetAllChildDicNodes(const DicNode *const dicNode, in createAndGetAllChildDicNodes() argument 57 if (!dicNode->hasChildren()) { in createAndGetAllChildDicNodes() 61 readingHelper.initWithPtNodeArrayPos(dicNode->getChildrenPtNodeArrayPos()); in createAndGetAllChildDicNodes() 79 childDicNodes->pushLeavingChild(dicNode, ptNodeParams.getHeadPos(), in createAndGetAllChildDicNodes()
|
/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()
|