Package org.apache.uima.jcas.tcas

Examples of org.apache.uima.jcas.tcas.Annotation.removeFromIndexes()


  {
      Annotation ann = new Annotation(jcas, beginSpan, endSpan);
      ann.addToIndexes();
      AnnotationIndex<?> annIdx = jcas.getAnnotationIndex(type);
      FSIterator<?> itr = annIdx.subiterator(ann);
      ann.removeFromIndexes();
      return itr;
  }

  /**
   * Does not use {@link #getAnnotationsInSpan(JCas, int, int, int, int[])} so we don't create a collection
View Full Code Here


  public static int countAnnotationsInSpan(JCas jcas, int type, int beginSpan, int endSpan)
  {
      Annotation ann = new Annotation(jcas, beginSpan, endSpan);
      ann.addToIndexes();
      AnnotationIndex<?> annIdx = jcas.getAnnotationIndex(type);
      ann.removeFromIndexes();
      return annIdx.size();
  }

  /**
   * returns a true if the annotation type is present in the span
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.