Examples of JCasResource


Examples of org.dbpedia.spotlight.uima.types.JCasResource

          LOG.info("Server request completed. Writing to the index");
          /*
           * Add the results to the AnnotationIndex
           */
          for (Resource resource : response.getResources()) {
            JCasResource res = new JCasResource(aJCas);
            res.setBegin(documentOffset + new Integer(resource.getOffset()));
            res.setEnd(documentOffset + new Integer(resource.getOffset())
            + resource.getSurfaceForm().length());
            res.setSimilarityScore(new Double(resource.getSimilarityScore()));
            res.setTypes(resource.getTypes());
            res.setSupport(new Integer(resource.getSupport()));
            res.setURI(resource.getURI());

            res.addToIndexes(aJCas);
          }

          documentOffset += request.length() + 1 ;

    }
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.