/packages/inputmethods/LatinIME/native/jni/ |
D | com_android_inputmethod_latin_BinaryDictionary.cpp | 267 const jsize codePointCount = env->GetArrayLength(word); in latinime_BinaryDictionary_getProbability() local 268 int codePoints[codePointCount]; in latinime_BinaryDictionary_getProbability() 269 env->GetIntArrayRegion(word, 0, codePointCount, codePoints); in latinime_BinaryDictionary_getProbability() 270 return dictionary->getProbability(CodePointArrayView(codePoints, codePointCount)); in latinime_BinaryDictionary_getProbability() 277 const jsize codePointCount = env->GetArrayLength(word); in latinime_BinaryDictionary_getMaxProbabilityOfExactMatches() local 278 int codePoints[codePointCount]; in latinime_BinaryDictionary_getMaxProbabilityOfExactMatches() 279 env->GetIntArrayRegion(word, 0, codePointCount, codePoints); in latinime_BinaryDictionary_getMaxProbabilityOfExactMatches() 281 CodePointArrayView(codePoints, codePointCount)); in latinime_BinaryDictionary_getMaxProbabilityOfExactMatches() 343 int codePointCount = wordLength; in latinime_BinaryDictionary_getWordProperty() local 345 codePointCount = CharUtils::attachBeginningOfSentenceMarker( in latinime_BinaryDictionary_getWordProperty() [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/utils/ |
D | char_utils.h | 90 const int codePointCount, const int maxCodePoint) { in attachBeginningOfSentenceMarker() argument 91 if (codePointCount > 0 && codePoints[0] == CODE_POINT_BEGINNING_OF_SENTENCE) { in attachBeginningOfSentenceMarker() 93 return codePointCount; in attachBeginningOfSentenceMarker() 95 if (codePointCount >= maxCodePoint) { in attachBeginningOfSentenceMarker() 99 memmove(codePoints + 1, codePoints, sizeof(int) * codePointCount); in attachBeginningOfSentenceMarker() 101 return codePointCount + 1; in attachBeginningOfSentenceMarker() 106 const int codePointCount) { in removeBeginningOfSentenceMarker() argument 107 if (codePointCount <= 0 || codePoints[0] != CODE_POINT_BEGINNING_OF_SENTENCE) { in removeBeginningOfSentenceMarker() 108 return codePointCount; in removeBeginningOfSentenceMarker() 110 const int newCodePointCount = codePointCount - 1; in removeBeginningOfSentenceMarker()
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/result/ |
D | suggestion_results.cpp | 51 void SuggestionResults::addPrediction(const int *const codePoints, const int codePointCount, in addPrediction() argument 57 addSuggestion(codePoints, codePointCount, probability, Dictionary::KIND_PREDICTION, in addPrediction() 61 void SuggestionResults::addSuggestion(const int *const codePoints, const int codePointCount, in addSuggestion() argument 64 if (codePointCount <= 0 || codePointCount > MAX_WORD_LENGTH) { in addSuggestion() 67 codePointCount); in addSuggestion() 73 && codePointCount < mWorstSuggestion.getCodePointCount())) { in addSuggestion() 79 mSuggestedWords.push(SuggestedWord(codePoints, codePointCount, score, type, in addSuggestion()
|
D | suggestion_results.h | 41 void addPrediction(const int *const codePoints, const int codePointCount, const int score); 42 void addSuggestion(const int *const codePoints, const int codePointCount,
|
D | suggested_word.h | 42 SuggestedWord(const int *const codePoints, const int codePointCount, in SuggestedWord() argument 45 : mCodePoints(codePoints, codePoints + codePointCount), mScore(score), in SuggestedWord()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/content/ |
D | shortcut_dict_content.cpp | 107 int codePointCount = 0; in copyShortcutListFromDictContent() local 109 codePoints, &codePointCount, &probability, &hasNext, &readingPos); in copyShortcutListFromDictContent() 110 if (!writeShortcutEntryAndAdvancePosition(codePoints, codePointCount, probability, in copyShortcutListFromDictContent() 130 const int codePointCount, const int probability, const bool hasNext, in writeShortcutEntryAndAdvancePosition() argument 139 if (!shortcutListBuffer->writeCodePointsAndAdvancePosition(codePoint, codePointCount, in writeShortcutEntryAndAdvancePosition() 149 const int *const targetCodePointsToFind, const int codePointCount) const { in findShortcutEntryAndGetPos() 159 if (targetCodePointCount != codePointCount) { in findShortcutEntryAndGetPos() 163 for (int i = 0; i < codePointCount; ++i) { in findShortcutEntryAndGetPos()
|
D | shortcut_dict_content.h | 69 bool writeShortcutEntry(const int *const codePoint, const int codePointCount, in writeShortcutEntry() argument 72 return writeShortcutEntryAndAdvancePosition(codePoint, codePointCount, probability, in writeShortcutEntry() 77 const int codePointCount, const int probability, const bool hasNext, 81 const int *const targetCodePointsToFind, const int codePointCount) const;
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/content/ |
D | shortcut_dict_content.cpp | 122 int codePointCount = 0; in copyShortcutListFromDictContent() local 124 codePoints, &codePointCount, &probability, &hasNext, &readingPos); in copyShortcutListFromDictContent() 125 if (!writeShortcutEntryAndAdvancePosition(codePoints, codePointCount, probability, in copyShortcutListFromDictContent() 145 const int codePointCount, const int probability, const bool hasNext, in writeShortcutEntryAndAdvancePosition() argument 154 if (!shortcutListBuffer->writeCodePointsAndAdvancePosition(codePoint, codePointCount, in writeShortcutEntryAndAdvancePosition() 164 const int *const targetCodePointsToFind, const int codePointCount) const { in findShortcutEntryAndGetPos() 174 if (targetCodePointCount != codePointCount) { in findShortcutEntryAndGetPos() 178 for (int i = 0; i < codePointCount; ++i) { in findShortcutEntryAndGetPos()
|
D | shortcut_dict_content.h | 76 bool writeShortcutEntry(const int *const codePoint, const int codePointCount, in writeShortcutEntry() argument 79 return writeShortcutEntryAndAdvancePosition(codePoint, codePointCount, probability, in writeShortcutEntry() 84 const int codePointCount, const int probability, const bool hasNext, 88 const int *const targetCodePointsToFind, const int codePointCount) const;
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/property/ |
D | ngram_context.cpp | 96 int codePointCount = wordCodePointCount; in getWordId() local 97 memmove(codePoints, wordCodePoints, sizeof(int) * codePointCount); in getWordId() 99 codePointCount = CharUtils::attachBeginningOfSentenceMarker(codePoints, codePointCount, in getWordId() 101 if (codePointCount <= 0) { in getWordId() 105 const CodePointArrayView codePointArrayView(codePoints, codePointCount); in getWordId()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/common/ |
D | StringUtilsTests.java | 448 int codePointCount = StringUtils.copyCodePointsAndReturnCodePointCount(codePointArray, in testCopyCodePointsAndReturnCodePointCount() local 451 assertEquals("copyCodePointsAndReturnCodePointCount, size matches", codePointCount, in testCopyCodePointsAndReturnCodePointCount() 453 for (int i = 0; i < codePointCount; ++i) { in testCopyCodePointsAndReturnCodePointCount() 458 codePointCount = StringUtils.copyCodePointsAndReturnCodePointCount(codePointArray, in testCopyCodePointsAndReturnCodePointCount() 461 assertEquals("copyCodePointsAndReturnCodePointCount downcase, size matches", codePointCount, in testCopyCodePointsAndReturnCodePointCount() 463 for (int i = 0; i < codePointCount; ++i) { in testCopyCodePointsAndReturnCodePointCount() 470 codePointCount = StringUtils.copyCodePointsAndReturnCodePointCount(codePointArray, in testCopyCodePointsAndReturnCodePointCount() 472 assertEquals("copyCodePointsAndReturnCodePointCount, size matches", codePointCount, in testCopyCodePointsAndReturnCodePointCount() 474 for (int i = 0; i < codePointCount; ++i) { in testCopyCodePointsAndReturnCodePointCount() 482 codePointCount = StringUtils.copyCodePointsAndReturnCodePointCount(codePointArray, in testCopyCodePointsAndReturnCodePointCount()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/shortcut/ |
D | ver4_shortcut_list_policy.h | 56 bool addNewShortcut(const int terminalId, const int *const codePoints, const int codePointCount, in addNewShortcut() argument 66 return mShortcutDictContent->writeShortcutEntry(codePoints, codePointCount, probability, in addNewShortcut() 70 codePoints, codePointCount); 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/ |
D | ver4_shortcut_list_policy.h | 66 bool addNewShortcut(const int terminalId, const int *const codePoints, const int codePointCount, in addNewShortcut() argument 76 return mShortcutDictContent->writeShortcutEntry(codePoints, codePointCount, probability, in addNewShortcut() 80 codePoints, codePointCount); 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/ |
D | dynamic_pt_writing_utils.cpp | 91 const int codePointCount, int *const codePointFieldPos) { in writeCodePointsAndAdvancePosition() argument 92 if (codePointCount <= 0) { in writeCodePointsAndAdvancePosition() 94 codePointCount); in writeCodePointsAndAdvancePosition() 98 const bool hasMultipleCodePoints = codePointCount > 1; in writeCodePointsAndAdvancePosition() 99 return buffer->writeCodePointsAndAdvancePosition(codePoints, codePointCount, in writeCodePointsAndAdvancePosition()
|
D | pt_node_params.h | 61 const int codePointCount, const int *const codePoints, const int probability, in PtNodeParams() argument 65 mCodePointCount(codePointCount), mCodePoints(), mTerminalIdFieldPos(NOT_A_DICT_POS), in PtNodeParams() 76 const int parentPos, const int codePointCount, const int *const codePoints, in PtNodeParams() argument 80 mCodePointCount(codePointCount), mCodePoints(), in PtNodeParams()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/ |
D | byte_array_utils.h | 213 const int *const codePoints, const int codePointCount, const bool writesTerminator, in writeCodePointsAndAdvancePosition() argument 215 for (int i = 0; i < codePointCount; ++i) { in writeCodePointsAndAdvancePosition() 234 const int codePointCount, const bool writesTerminator) { in calculateRequiredByteCountToStoreCodePoints() argument 236 for (int i = 0; i < codePointCount; ++i) { in calculateRequiredByteCountToStoreCodePoints()
|
D | buffer_with_extendable_buffer.cpp | 87 const int codePointCount, const bool writesTerminator, int *const pos) { in writeCodePointsAndAdvancePosition() argument 89 codePoints, codePointCount, writesTerminator); in writeCodePointsAndAdvancePosition() 99 ByteArrayUtils::writeCodePointsAndAdvancePosition(buffer, codePoints, codePointCount, in writeCodePointsAndAdvancePosition()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
D | KeySpecParser.java | 178 if (StringUtils.codePointCount(outputText) == 1) { in getOutputText() 193 return (StringUtils.codePointCount(label) == 1) ? null : label; in getOutputText() 210 if (StringUtils.codePointCount(outputText) == 1) { in getCode() 220 return (StringUtils.codePointCount(label) == 1) ? label.codePointAt(0) : CODE_OUTPUT_TEXT; in getCode()
|
/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/ |
D | StringUtils.java | 110 public static int codePointCount(@Nullable final CharSequence text) { in codePointCount() method in StringUtils 114 return Character.codePointCount(text, 0, text.length()); in codePointCount() 254 new int[Character.codePointCount(charSequence, startIndex, endIndex)]; in toCodePointArray() 544 final int N = codePointCount(s); in isEmptyStringOrWhiteSpaces() 615 return codePointCount(titleCaseLabel) == 1 in toTitleCaseOfKeyCode()
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dictionary/ |
D | dictionary.cpp | 77 const int codePointCount = mDictStructurePolicy->getCodePointsAndReturnCodePointCount( in onVisitEntry() local 79 if (codePointCount <= 0) { in onVisitEntry() 87 mSuggestionResults->addPrediction(targetWordCodePoints, codePointCount, in onVisitEntry()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/ |
D | ver4_patricia_trie_node_reader.cpp | 55 const int codePointCount = PatriciaTrieReadingUtils::getCharsAndAdvancePosition( in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() local 85 return PtNodeParams(headPos, flags, parentPos, codePointCount, codePoints, in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
|
D | ver4_patricia_trie_policy.cpp | 78 const int codePointCount = readingHelper.getCodePointsAndReturnCodePointCount( in getCodePointsAndReturnCodePointCount() local 84 return codePointCount; in getCodePointsAndReturnCodePointCount() 521 const int codePointCount = getCodePointsAndReturnCodePointCount(entry.getTargetWordId(), in getWordProperty() local 540 CodePointArrayView(ngramTargetCodePoints, codePointCount).toVector(), in getWordProperty()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/ |
D | ver4_patricia_trie_node_reader.cpp | 63 const int codePointCount = PatriciaTrieReadingUtils::getCharsAndAdvancePosition( in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() local 102 return PtNodeParams(headPos, flags, parentPos, codePointCount, codePoints, in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
|
D | ver4_patricia_trie_policy.cpp | 96 const int codePointCount = readingHelper.getCodePointsAndReturnCodePointCount( in getCodePointsAndReturnCodePointCount() local 102 return codePointCount; in getCodePointsAndReturnCodePointCount() 582 const int codePointCount = getCodePointsAndReturnCodePointCount( in getWordProperty() local 595 CodePointArrayView(bigramWord1CodePoints, codePointCount).toVector(), in getWordProperty()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/layout/expected/ |
D | ExpectedKeyOutput.java | 38 if (StringUtils.codePointCount(outputText) == 1) { in newInstance() 79 return StringUtils.codePointCount(text) == 1 && text.codePointAt(0) == mCode; in hasSameKeyOutput()
|