we can't use the object that gets the JiixDefinitions.Result mResult because we don't know the meaning of each candidate and label string
h
hong wenzhi
started a topic
over 2 years ago
Dear Myscript
We set up the editor, conf, and imported the coordinates to the editor, then we want to convert the results of the graphics or arithmetic, so we wrote the following code.
hong wenzhi
Dear Myscript
We set up the editor, conf, and imported the coordinates to the editor, then we want to convert the results of the graphics or arithmetic, so we wrote the following code.
Gson gson=new Gson();
try {
String jiixString = editor.export_(editor.getRootBlock(), MimeType.JIIX, conf);
JiixDefinitions.Result mResult=gson.fromJson(jiixString,JiixDefinitions.Result.class);
if(mResult!=null&&mResult.words!=null){
int length=mResult.words.length;
for(int i=0;i<length;i++){
JiixDefinitions.Word word = mResult.words[i];
String label = word.label;
Log.v("tag","label:"+label);
String[] candidates = word.candidates;
for(String candidate : candidates){
Log.v("tag","candidate:"+candidate);
}
}
}
} catch (IOException e) {
e.printStackTrace();
}
But we can't use the object that gets the JiixDefinitions.Result mResult because we don't know the meaning of each candidate and label string.
Please tell us the meaning of each of the candidate and label strings.
Or tell us a format description of the jiix file.