Basic Class to produce output json

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/nlphub@164447 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Erik Perrone 2018-02-20 12:11:43 +00:00
parent e68c3a31d6
commit 073b4ecfcb
1 changed files with 22 additions and 2 deletions

View File

@ -56,8 +56,8 @@ public class DefaultMapper implements JsonMapper {
}
data.addNerEntity(ne);
}
algInfo.addAnnotationData(data);
}
algInfo.addAnnotationData(data);
}
}
return algInfo.toJson().toString();
@ -67,7 +67,27 @@ public class DefaultMapper implements JsonMapper {
}
}
/*
public static void main(String[] args) {
String remoteJson = "http://data.d4science.org/a2JtV0lOUUxsenZCM2RmcFRqVGtWWm42NU9LQnFGTk9HbWJQNStIS0N6Yz0-VLT";
String alg = "ENGLISH_NAMED_ENTITY_RECOGNIZER";
//remoteJson = "http://data.d4science.org/T21IcHlMSzFJRCttZ1lHVzMxd2dyWjVOUEpyY2dwUVNHbWJQNStIS0N6Yz0-VLT";
}
DefaultMapper dm = new DefaultMapper();
try {
String s = dm.getJson(alg, remoteJson);
System.out.println("" + s);
String file = "/home/erico/debug.json";
java.io.File f = new java.io.File(file);
f.createNewFile();
java.io.FileWriter w = new java.io.FileWriter(f);
w.write(s);
w.flush();
w.close();
} catch (Exception x) {
System.out.println(x.getLocalizedMessage());
x.printStackTrace();
}
}*/
}