Package org.apache.uima.alchemy.ts.entity

Examples of org.apache.uima.alchemy.ts.entity.AlchemyAnnotation.addToIndexes()


    if (annotationStart > 0) {
      // create annotation
      AlchemyAnnotation alchemyAnnotation = new AlchemyAnnotation(cas, annotationStart, annotationStart + entityText
              .length());
      alchemyAnnotation.setAlchemyType(type.toString());
      alchemyAnnotation.addToIndexes();
      UIMAFramework.getLogger().log(Level.INFO, new StringBuilder("added AlchemyAnnotation for ").append(alchemyAnnotation.getCoveredText()).append(" of type ").append(type.toString()).toString());
      // update entity occurrences
      NonEmptyFSList list = (NonEmptyFSList) fs.getOccurrences();
      if (list != null) {
        NonEmptyFSList newTail = new NonEmptyFSList(cas);
View Full Code Here


        String antText = ant.substring(ant.indexOf("[") + 1);
        alchemyAnnotation.setEnd(indexOfAnt + antText.length() - 1);

        String antType = ant.substring(0, ant.indexOf("["));
        alchemyAnnotation.setAlchemyType(antType);
        alchemyAnnotation.addToIndexes();

        annotatedText = annotatedText.replaceFirst("\\[" + ant.replace("[", "\\[") + "\\]\\]",
                antText);
      }
    }
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.