Searched refs:afterLength (Results 1 – 4 of 4) sorted by relevance
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/utils/ |
D | edit_distance.h | 32 const int afterLength = policy->getString1Length(); in getEditDistance() local 33 float dp[(beforeLength + 1) * (afterLength + 1)]; in getEditDistance() 35 dp[(afterLength + 1) * i] = i * policy->getInsertionCost(i - 1, -1); in getEditDistance() 37 for (int i = 0; i <= afterLength; ++i) { in getEditDistance() 42 for (int j = 0; j < afterLength; ++j) { in getEditDistance() 43 dp[(afterLength + 1) * (i + 1) + (j + 1)] = std::min( in getEditDistance() 44 dp[(afterLength + 1) * i + (j + 1)] + policy->getInsertionCost(i, j), in getEditDistance() 46 dp[(afterLength + 1) * (i + 1) + j] + policy->getDeletionCost(i, j), in getEditDistance() 47 dp[(afterLength + 1) * i + j] + policy->getSubstitutionCost(i, j))); in getEditDistance() 49 dp[(afterLength + 1) * (i + 1) + (j + 1)] = std::min( in getEditDistance() [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/utils/ |
D | autocorrection_threshold_utils.cpp | 33 const int beforeLength, const int *after, const int afterLength) { in editDistance() argument 35 before, beforeLength, after, afterLength); in editDistance() 71 const int beforeLength, const int *after, const int afterLength, const int score) { in calcNormalizedScore() argument 72 if (0 == beforeLength || 0 == afterLength) { in calcNormalizedScore() 75 const int distance = editDistance(before, beforeLength, after, afterLength); in calcNormalizedScore() 77 for (int i = 0; i < afterLength; ++i) { in calcNormalizedScore() 83 if (spaceCount == afterLength) { in calcNormalizedScore() 87 if (score <= 0 || distance >= afterLength) { in calcNormalizedScore() 93 const float weight = 1.0f - static_cast<float>(distance) / static_cast<float>(afterLength); in calcNormalizedScore() 103 static_cast<float>(std::min(beforeLength, afterLength - spaceCount))) in calcNormalizedScore()
|
D | autocorrection_threshold_utils.h | 27 const int *after, const int afterLength, const int score); 29 const int afterLength);
|
/packages/inputmethods/LatinIME/native/jni/ |
D | com_android_inputmethod_latin_BinaryDictionaryUtils.cpp | 62 jsize afterLength = env->GetArrayLength(after); in latinime_BinaryDictionaryUtils_calcNormalizedScore() local 64 int afterCodePoints[afterLength]; in latinime_BinaryDictionaryUtils_calcNormalizedScore() 66 env->GetIntArrayRegion(after, 0, afterLength, afterCodePoints); in latinime_BinaryDictionaryUtils_calcNormalizedScore() 68 afterCodePoints, afterLength, score); in latinime_BinaryDictionaryUtils_calcNormalizedScore()
|