Home
last modified time | relevance | path

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

12

/packages/inputmethods/LatinIME/native/jni/
Dcom_android_inputmethod_latin_BinaryDictionary.cpp267 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/
Dchar_utils.h90 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/
Dsuggestion_results.cpp51 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()
Dsuggestion_results.h41 void addPrediction(const int *const codePoints, const int codePointCount, const int score);
42 void addSuggestion(const int *const codePoints, const int codePointCount,
Dsuggested_word.h42 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/
Dshortcut_dict_content.cpp107 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()
Dshortcut_dict_content.h69 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/
Dshortcut_dict_content.cpp122 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()
Dshortcut_dict_content.h76 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/
Dngram_context.cpp96 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/
DStringUtilsTests.java448 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/
Dver4_shortcut_list_policy.h56 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/
Dver4_shortcut_list_policy.h66 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/
Ddynamic_pt_writing_utils.cpp91 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()
Dpt_node_params.h61 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/
Dbyte_array_utils.h213 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()
Dbuffer_with_extendable_buffer.cpp87 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/
DKeySpecParser.java178 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/
DStringUtils.java110 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/
Ddictionary.cpp77 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/
Dver4_patricia_trie_node_reader.cpp55 const int codePointCount = PatriciaTrieReadingUtils::getCharsAndAdvancePosition( in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() local
85 return PtNodeParams(headPos, flags, parentPos, codePointCount, codePoints, in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
Dver4_patricia_trie_policy.cpp78 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/
Dver4_patricia_trie_node_reader.cpp63 const int codePointCount = PatriciaTrieReadingUtils::getCharsAndAdvancePosition( in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() local
102 return PtNodeParams(headPos, flags, parentPos, codePointCount, codePoints, in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
Dver4_patricia_trie_policy.cpp96 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/
DExpectedKeyOutput.java38 if (StringUtils.codePointCount(outputText) == 1) { in newInstance()
79 return StringUtils.codePointCount(text) == 1 && text.codePointAt(0) == mCode; in hasSameKeyOutput()

12