}
}
public String asXML(Text text, int nHits, List<OntologyType> ontologyTypes) {
//PrettyPrinter printer = new scala.xml.PrettyPrinter(80, 2);
Node node = OutputSerializer.tagsAsXml(text, ExtractTags.extractor().extract(text, nHits, ontologyTypes));
//StringBuilder builder = new StringBuilder();
//printer.format(node, builder);
String response = node.toString();
LOG.info(String.format("Response: %s",response));
return response;
}