return result.toString();
} else if (command.equals("script.ed")) {
String str1 = obj.optString("string1").toUpperCase();
String str2 = obj.optString("string2").toUpperCase();
EditDistance ed = new EditDistance(str1, str2,
new IdentityEditDistanceScoringMatrix());
if (str1 == null || str2 == null)
return error("got no strings");
ed.buildMatrix();
int score = (int) ed.getAlignmentScore();
String[] res = ed.printAlignments();
result.put("command", "OK");
result.put("score", score);
result.put("line1", res[0]);
result.put("middle", res[1]);