Package org.dbpedia.spotlight.web.rest.output

Examples of org.dbpedia.spotlight.web.rest.output.Annotation.toXML()


        try {
            String textToProcess = ServerUtils.getTextToProcess(text, inUrl);
            Annotation a = getAnnotation(textToProcess, confidence, support, dbpediaTypes, sparqlQuery, policy, coreferenceResolution, spotter, disambiguatorName, clientIp);
            LOG.info("XML format");
            String content = a.toXML();
            return ServerUtils.ok(content);
        } catch (Exception e) {
            throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST). entity(e.getMessage()).type(MediaType.TEXT_XML).build());
        }
    }
View Full Code Here


        /* Running Annotation */

        Annotation annotation = process(text, confidence, support, ontologyTypesString, sparqlQuery, blacklist, coreferenceResolution, spotter, disambiguator);

        LOG.debug("Shown: "+annotation.toXML());
        LOG.debug("****************************************************************");

        return annotation;
    }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.