diff options
author | 2013-06-13 10:17:47 -0700 | |
---|---|---|
committer | 2013-06-13 11:03:49 -0700 | |
commit | fc98325c61e5df3845f3d2b4906b0af301204b73 (patch) | |
tree | 08615f716dafa4681beda6c0b6857eec021439a0 /java/src/com/android/inputmethod/research/JsonUtils.java | |
parent | 27d9c6f795a0856c401b3d4189f60be71bac0e98 (diff) | |
download | latinime-fc98325c61e5df3845f3d2b4906b0af301204b73.tar.gz latinime-fc98325c61e5df3845f3d2b4906b0af301204b73.tar.xz latinime-fc98325c61e5df3845f3d2b4906b0af301204b73.zip |
Log score, kind, and sourceDict for manual suggestion and gesture
b/9422713
Change-Id: I4880fad6a5b10d09ca11b63311f14862bee724e5
Diffstat (limited to 'java/src/com/android/inputmethod/research/JsonUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/research/JsonUtils.java | 9 |
1 files changed, 7 insertions, 2 deletions
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(); |