Skip to content

Instantly share code, notes, and snippets.

@jzonthemtn jzonthemtn/dependencies
Last active Sep 28, 2017

What would you like to do?
String text = "George Washington was president.";
IdylE3Client idylE3Client = IdylE3ClientFactory.getIdylE3Client("http://localhost:9000/");
EntityExtractionResponse response = idylE3Client.extract(text);
AnnotationTypeRegistry atr = processing.getService().getDocumentTypeManager().getAnnotationTypeRegistry();
AnnotationType person = atr.getType("markup");
SpanList root = new SpanList();
SpanTree tree = new SpanTree(name, root);
for(Entity entity : response.getEntities()) {
Span span = new Span(entity.getSpan().getCharacterStart(), entity.getText().length());
tree.annotate(span, person);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.