Examples of addToIndexes()


Examples of org.apache.ctakes.typesystem.type.textsem.ConditionalModifier.addToIndexes()

       
      } else if ("conditional_class".equals(annotation.type)) {
        Boolean value = booleanSlots.remove("conditional_normalization");
        ConditionalModifier modifier = new ConditionalModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setConditional(value == null ? false : value);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("generic_class".equals(annotation.type)) {
        Boolean value = booleanSlots.remove("generic_normalization");
        GenericModifier modifier = new GenericModifier(jCas, coveringSpan.begin, coveringSpan.end);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.ContextAnnotation.addToIndexes()

    ContextAnnotation nec = new ContextAnnotation(aJCas);
    nec.setBegin(s.getBegin() + t.getStart() - 1);
    nec.setEnd(s.getBegin() + t.getEnd() - 1);
    nec.setScope(t.getTag());
    nec.setFocusText(anno.getCoveredText());
    nec.addToIndexes();
  }

}
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.CourseModifier.addToIndexes()

        attribute.setValue(stringSlots.remove("course_normalization"));
        attribute.addToIndexes();
        CourseModifier modifier = new CourseModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setTypeID(CONST.MODIFIER_TYPE_ID_COURSE_CLASS);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("estimated_flag_indicator".equals(annotation.type)) {
        boolean value = booleanSlots.remove("estimated_normalization");
        LabEstimatedModifier modifier = new LabEstimatedModifier(jCas, coveringSpan.begin, coveringSpan.end);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.DateAnnotation.addToIndexes()

      String date = (new java.util.Date()).toString();
      jCas.setDocumentText(date);
      DateAnnotation ctakesDate = new DateAnnotation(jCas);
      ctakesDate.setBegin(0);
      ctakesDate.setEnd(date.length());
      ctakesDate.addToIndexes();
      DateAnnotator dateAnnotator = new DateAnnotator();
      dateAnnotator.dateType = org.apache.ctakes.ytex.uima.types.Date.class.getName();
      dateAnnotator.process(jCas);
      AnnotationIndex<Annotation> ytexDates = jCas.getAnnotationIndex(org.apache.ctakes.ytex.uima.types.Date.type);
      Assert.assertTrue(ytexDates.iterator().hasNext());
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.DiseaseDisorderMention.addToIndexes()

        date.setMonth(month);
        date.setDay(day);
        date.addToIndexes();
        TimeMention mention = new TimeMention(jCas, coveringSpan.begin, coveringSpan.end);
        mention.setDate(date);
        mention.addToIndexes();
        idAnnotationMap.put(annotation.id, mention);

      } else if (eventRelationTypes.contains(annotation.type)) {
        // store the ALINK information for later, once all annotations are in the CAS
        DelayedRelation relation = new DelayedRelation();
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.EntityMention.addToIndexes()

        entityMention.setTypeID(Mapper.getEntityTypeId(entityTypes.get(entry.getKey())));
        entityMention.setId(identifiedAnnotationId++);
        entityMention.setDiscoveryTechnique(CONST.NE_DISCOVERY_TECH_GOLD_ANNOTATION);
        entityMention.setConfidence(1);
       
        entityMention.addToIndexes();
      }
  }
}
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.EventMention.addToIndexes()

        eventMention.setEvent(event);

        // add the annotations to the indexes
        eventProperties.addToIndexes();
        event.addToIndexes();
        eventMention.addToIndexes();
        idAnnotationMap.put(annotation.id, eventMention);

      } else if ("DOCTIME".equals(annotation.type)) {
        // TODO
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.FractionAnnotation.addToIndexes()

      Set<FractionToken> fractionTokenSet = iv_fractionFSM.execute(baseTokenList);
      Iterator<FractionToken> fractionTokenItr = fractionTokenSet.iterator();
      while (fractionTokenItr.hasNext()) {
        FractionToken ft = fractionTokenItr.next();
        FractionAnnotation fa = new FractionAnnotation(jcas, ft.getStartOffset(), ft.getEndOffset());
        fa.addToIndexes();
      }

      Set<RangeToken> rangeTokenSet = iv_rangeFSM.execute(baseTokenList, romanNumeralTokenSet);
      Iterator<RangeToken> rangeTokenItr = rangeTokenSet.iterator();
      while (rangeTokenItr.hasNext()) {
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.GenericModifier.addToIndexes()

      } else if ("generic_class".equals(annotation.type)) {
        Boolean value = booleanSlots.remove("generic_normalization");
        GenericModifier modifier = new GenericModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setGeneric(value == null ? false : value);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("negation_indicator_class".equals(annotation.type)) {
        String value = stringSlots.remove("negation_indicator_normalization");
        PolarityModifier modifier = new PolarityModifier(jCas, coveringSpan.begin, coveringSpan.end);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.HistoryOfModifier.addToIndexes()

        MedicationDosage attribute = new MedicationDosage(jCas);
        attribute.setValue(value);
        attribute.addToIndexes();
        MedicationDosageModifier modifier = new MedicationDosageModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("Duration".equals(annotation.type)) {
        String value = stringSlots.remove("duration_values");
        MedicationDuration attribute = new MedicationDuration(jCas);
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.