From fc98325c61e5df3845f3d2b4906b0af301204b73 Mon Sep 17 00:00:00 2001 From: Kurt Partridge Date: Thu, 13 Jun 2013 10:17:47 -0700 Subject: Log score, kind, and sourceDict for manual suggestion and gesture b/9422713 Change-Id: I4880fad6a5b10d09ca11b63311f14862bee724e5 --- java/src/com/android/inputmethod/research/JsonUtils.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/research/JsonUtils.java') diff --git a/java/src/com/android/inputmethod/research/JsonUtils.java b/java/src/com/android/inputmethod/research/JsonUtils.java index 24cd8d935..63d524df7 100644 --- a/java/src/com/android/inputmethod/research/JsonUtils.java +++ b/java/src/com/android/inputmethod/research/JsonUtils.java @@ -94,12 +94,17 @@ import java.util.Map; .value(words.mIsPunctuationSuggestions); jsonWriter.name("isObsoleteSuggestions").value(words.mIsObsoleteSuggestions); jsonWriter.name("isPrediction").value(words.mIsPrediction); - jsonWriter.name("words"); + jsonWriter.name("suggestedWords"); jsonWriter.beginArray(); final int size = words.size(); for (int j = 0; j < size; j++) { final SuggestedWordInfo wordInfo = words.getInfo(j); - jsonWriter.value(wordInfo.toString()); + jsonWriter.beginObject(); + jsonWriter.name("word").value(wordInfo.toString()); + jsonWriter.name("score").value(wordInfo.mScore); + jsonWriter.name("kind").value(wordInfo.mKind); + jsonWriter.name("sourceDict").value(wordInfo.mSourceDict); + jsonWriter.endObject(); } jsonWriter.endArray(); jsonWriter.endObject(); -- cgit v1.2.3-83-g751a