Examples of removeFromIndexes()


Examples of org.apache.ctakes.typesystem.type.relation.RelationArgument.removeFromIndexes()

        continue;
      }

      System.out.println("removing: "+ timeText + "-" + eventText);
      arg1.removeFromIndexes();                                                                                           
      arg2.removeFromIndexes();                                                                                           
      relation.removeFromIndexes();
    }

    // remove events (that didn't participate in relations) not discovered by dictionary lookup
    for(EventMention mention : Lists.newArrayList(JCasUtil.select(goldView, EventMention.class))) {
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textspan.LookupWindowAnnotation.removeFromIndexes()

        LookupWindowAnnotation lw1 = lws.get(i);
        LookupWindowAnnotation lw2 = lws.get(i+1);
        if(lw1.getBegin() <= lw2.getBegin() && lw1.getEnd() >= lw2.getEnd()){
          /// lw1 envelops or encloses lw2
          lws.remove(i+1);
          lw2.removeFromIndexes();
        }
      }
     
    }
   
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textspan.LookupWindowAnnotation.removeFromIndexes()

        LookupWindowAnnotation lw1 = lws.get(i);
        LookupWindowAnnotation lw2 = lws.get(i+1);
        if(lw1.getBegin() <= lw2.getBegin() && lw1.getEnd() >= lw2.getEnd()){
          /// lw1 envelops or encloses lw2
          lws.remove(i+1);
          lw2.removeFromIndexes();
        }
      }
     
    }
   
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textspan.Sentence.removeFromIndexes()

              // System.out.println("Old Sentence ["+text.substring(prevSent.getBegin(),
              // prevSent.getEnd())+"]");
              prevSent.setEnd(newEnd);
              // System.out.println("New Sentence ["+text.substring(prevSent.getBegin(),
              // prevSent.getEnd())+"]");
              currSent.removeFromIndexes();
            }
          }
        }
      }
    }
View Full Code Here

Examples of org.apache.uima.jcas.cas.TOP.removeFromIndexes()

        // remove old NominalAttributeValue objects from CAS
        Iterator<NominalAttributeValue> removalItr = removalList.iterator();
        while (removalItr.hasNext())
        {
            TOP top = (TOP) removalItr.next();
            top.removeFromIndexes();
        }
     
        /**
         *
         * This is to deal with cases like "nonsmoker" and "non-smoker"
View Full Code Here

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

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

  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

Examples of org.apache.uima.ruta.type.RutaAnnotation.removeFromIndexes()

      newAnnotation.addToIndexes();
      stream.addAnnotation(newAnnotation, match);
    } else {
      RutaAnnotation tma = stream.getCorrectTMA(annotationsInWindow, heuristicAnnotation);
      if (tma != null) {
        tma.removeFromIndexes();
        double newScore = tma.getScore() + deltaScore;
        tma.setScore(newScore);
        tma.addToIndexes();
      } else {
        heuristicAnnotation.addToIndexes();
View Full Code Here

Examples of org.apache.uima.ruta.type.RutaAnnotation.removeFromIndexes()

      newAnnotation.addToIndexes();
      stream.addAnnotation(newAnnotation, match);
    } else {
      RutaAnnotation tma = stream.getCorrectTMA(annotationsInWindow, heuristicAnnotation);
      if (tma != null) {
        tma.removeFromIndexes();
        double newScore = tma.getScore() + deltaScore;
        tma.setScore(newScore);
        tma.addToIndexes();
      } else {
        heuristicAnnotation.addToIndexes();
View Full Code Here

Examples of org.apache.uima.ruta.type.RutaAnnotation.removeFromIndexes()

      newAnnotation.addToIndexes();
      stream.addAnnotation(newAnnotation, match);
    } else {
      RutaAnnotation tma = stream.getCorrectTMA(annotationsInWindow, heuristicAnnotation);
      if (tma != null) {
        tma.removeFromIndexes();
        double newScore = tma.getScore() + deltaScore;
        tma.setScore(newScore);
        tma.addToIndexes();
      } else {
        heuristicAnnotation.addToIndexes();
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.