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

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


        try {
            String textToProcess = ServerUtils.getTextToProcess(text, inUrl);
            Annotation a = getAnnotation(textToProcess, confidence, support, dbpediaTypes, sparqlQuery, policy, coreferenceResolution, spotter, disambiguatorName, clientIp);
            LOG.info("JSON format");
            String content = a.toJSON();
            return ServerUtils.ok(content);
        } catch (Exception e) {
            throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST). entity(e.getMessage()).type(MediaType.APPLICATION_JSON).build());
        }
    }
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.