Show prediction results in debug build.

Bug: 16547409
Change-Id: If85418583998cd639c794bf5d5cfbbb972c34f72
This commit is contained in:
Keisuke Kuroyanagi 2014-10-06 18:36:54 +09:00
parent ff27bcad74
commit 36c4eaadfb
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(