Examples of moveToPrevious()


Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

    FSIterator iterator = cas.getAnnotationIndex().iterator(pointer);
    int nextEnd = -1;

    // ???
    iterator.moveToPrevious();
    iterator.moveToPrevious();
    while (iterator.isValid()) {
      FeatureStructure fs = iterator.get();
      if (fs instanceof AnnotationFS) {
        AnnotationFS a = (AnnotationFS) fs;
        if (!filterSetWithSlotNames.contains(a.getType().getName())) {
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

      FeatureStructure fs = iterator.get();
      if (fs instanceof AnnotationFS) {
        AnnotationFS a = (AnnotationFS) fs;
        if (!filterSetWithSlotNames.contains(a.getType().getName())) {
          if (a.getEnd() > example.getAnnotation().getEnd()) {
            iterator.moveToPrevious();
            continue;
          }
          if (nextEnd == -1) {
            nextEnd = a.getEnd();
          } else if (nextEnd != a.getEnd()) {
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

                    example.getDocument(), consideredFeatures));
            result.add(term);
          }
        }
      }
      iterator.moveToPrevious();
    }
    return result;
  }

  public String getResultString() {
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

            return coverFs;
         } else {
            // current coverFs does not cover the current match type annotation
            // lets try to move iterator to the previous annotation and check
            // again
            iterator.moveToPrevious();
            // check if the iterator is still valid after me move it to the
            // previous FS
            if (iterator.isValid()) {
               // get FS
               coverFs = (AnnotationFS) iterator.get();
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

    subiterator.moveToNext();
    if (!subiterator.isValid())
      subiterator.moveTo(focus);

    while (scopeContextAnnotations.size() < leftScopeSize) {
      subiterator.moveToPrevious();
      if (subiterator.isValid()) {
        Annotation contextAnnotation = (Annotation) subiterator.get();
        if (contextAnnotation.getEnd() > focus.getBegin()) {
          continue;
        }
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

    if (focus.getBegin() < window.getBegin() || focus.getEnd() > window.getEnd())
      return scopeContextAnnotations;

    FSIterator subiterator = jCas.getAnnotationIndex(contextType).subiterator(window);
    subiterator.moveTo(focus);
    subiterator.moveToPrevious();
    if (!subiterator.isValid())
      subiterator.moveTo(focus);

    while (scopeContextAnnotations.size() < rightScopeSize) {
      subiterator.moveToNext();
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

    AnnotationFS pointer = cas.createAnnotation(frameType, begin, begin);
    FSIterator iterator = cas.getAnnotationIndex().iterator(pointer);
    int nextEnd = -1;

    // ???
    iterator.moveToPrevious();
    iterator.moveToPrevious();
    while (iterator.isValid()) {
      FeatureStructure fs = iterator.get();
      if (fs instanceof AnnotationFS) {
        AnnotationFS a = (AnnotationFS) fs;
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

    FSIterator iterator = cas.getAnnotationIndex().iterator(pointer);
    int nextEnd = -1;

    // ???
    iterator.moveToPrevious();
    iterator.moveToPrevious();
    while (iterator.isValid()) {
      FeatureStructure fs = iterator.get();
      if (fs instanceof AnnotationFS) {
        AnnotationFS a = (AnnotationFS) fs;
        if (!filterSetWithSlotNames.contains(a.getType().getName())) {
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

      FeatureStructure fs = iterator.get();
      if (fs instanceof AnnotationFS) {
        AnnotationFS a = (AnnotationFS) fs;
        if (!filterSetWithSlotNames.contains(a.getType().getName())) {
          if (a.getEnd() > example.getAnnotation().getEnd()) {
            iterator.moveToPrevious();
            continue;
          }
          if (nextEnd == -1) {
            nextEnd = a.getEnd();
          }
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

                    new TextRulerAnnotation(a, example.getDocument()));
            result.add(term);
          }
        }
      }
      iterator.moveToPrevious();
    }
    return result;
  }

  public String getResultString() {
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.