am 70d10976: Merge "Show prediction results in debug build."

* commit '70d10976c6fa8e8b2072b6f08850e57b844300e4':
  Show prediction results in debug build.
main
Keisuke Kuroyanagi 2014-10-06 10:08:19 +00:00 committed by Android Git Automerger
commit 21016802ce
3 changed files with 4 additions and 4 deletions

View File

@ -252,6 +252,9 @@ static void latinime_BinaryDictionary_getSuggestions(JNIEnv *env, jclass clazz,
} else {
dictionary->getPredictions(&prevWordsInfo, &suggestionResults);
}
if (DEBUG_DICT) {
suggestionResults.dumpSuggestions();
}
suggestionResults.outputSuggestions(env, outSuggestionCount, outCodePointsArray,
outScoresArray, outSpaceIndicesArray, outTypesArray,
outAutoCommitFirstWordConfidenceArray, inOutWeightOfLangModelVsSpatialModel);

View File

@ -119,7 +119,7 @@ static inline void dumpWordInfo(const int *word, const int length, const int ran
const int probability) {
static char charBuf[50];
const int N = intArrayToCharArray(word, length, charBuf, NELEMS(charBuf));
if (N > 1) {
if (N > 0) {
AKLOGI("%2d [ %s ] (%d)", rank, charBuf, probability);
}
}

View File

@ -55,9 +55,6 @@ void Dictionary::getSuggestions(ProximityInfo *proximityInfo, DicTraverseSession
suggest->getSuggestions(proximityInfo, traverseSession, xcoordinates,
ycoordinates, times, pointerIds, inputCodePoints, inputSize,
weightOfLangModelVsSpatialModel, outSuggestionResults);
if (DEBUG_DICT) {
outSuggestionResults->dumpSuggestions();
}
}
Dictionary::NgramListenerForPrediction::NgramListenerForPrediction(