Examples of addToIndexes()


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

        if (subject == null && this.setDefaults) {
          subject = SHARPKnowtatorXMLDefaults.getSubject();
        }
        SubjectModifier modifier = new SubjectModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setSubject(subject);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

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

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

      Set<TimeToken> timeTokenSet = iv_timeFSM.execute(baseTokenList);
      Iterator<TimeToken> timeTokenItr = timeTokenSet.iterator();
      while (timeTokenItr.hasNext()) {
        TimeToken tt = timeTokenItr.next();
        TimeAnnotation ta = new TimeAnnotation(jcas, tt.getStartOffset(), tt.getEndOffset());
        ta.addToIndexes();
      }

      Set<RomanNumeralToken> romanNumeralTokenSet = iv_romanNumeralFSM.execute(baseTokenList);
      Iterator<RomanNumeralToken> romanNumeralTokenItr = romanNumeralTokenSet.iterator();
      while (romanNumeralTokenItr.hasNext()) {
View Full Code Here

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

        // TODO

      } else if ("TIMEX3".equals(annotation.type)) {
        String timexClass = stringSlots.remove("class");
        TimeMention timeMention = new TimeMention(jCas, coveringSpan.begin, coveringSpan.end);
        timeMention.addToIndexes();
        idAnnotationMap.put(annotation.id, timeMention);
        // TODO

      } else if ("generic_class".equals(annotation.type)) {
        // TODO: there's currently no Generic in the type system
View Full Code Here

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

        } else if (value.equals("indicator_present")) {
          modifier.setUncertainty(CONST.NE_UNCERTAINTY_PRESENT);
        } else {
          throw new UnsupportedOperationException("Invalid uncertainty: " + value);
        }
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("Person".equals(annotation.type)) {
        String value = stringSlots.remove("subject_normalization_CU");
        String uimaValue = SUBJECT_KNOWTATOR_TO_UIMA_MAP.get(value);
View Full Code Here

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

      tok.setEnd(text.length());
      tok.addToIndexes();
      LookupWindowAnnotation lwa = new LookupWindowAnnotation(jCas);
      lwa.setBegin(0);
      lwa.setEnd(text.length());
      lwa.addToIndexes();
    AggregateBuilder builder = new AggregateBuilder();
    addDescriptor(builder,
        "desc/analysis_engine/DictionaryLookupAnnotator.xml");
    AnalysisEngine engine = builder.createAggregate();
    engine.process(jCas);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textspan.Segment.addToIndexes()

      jCas.setDocumentText(text);
      Segment s = new Segment(jCas);
      s.setBegin(0);
      s.setEnd(text.length());
      s.setId("DEFAULT");
      s.addToIndexes();
      ner.process(jCas);
      // run the analysis engine
      AnnotationIndex<Annotation> mentions = jCas.getAnnotationIndex(EntityMention.type);
    Iterator<Annotation> iter =mentions.iterator();
    int emCount = 0;
View Full Code Here

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

        sa.setEnd(span.getEnd());
        if (previousEnd <= sa.getBegin()) {
          // System.out.println("Adding Sentence Annotation for " +
          // span.toString());
          sa.setSentenceNumber(sentenceCount);
          sa.addToIndexes();
          sentenceCount++;
          previousEnd = span.getEnd();
        } else {
          logger.error("Skipping sentence from " + span.getStart()
              + " to " + span.getEnd());
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.util.Pairs.addToIndexes()

                }

            }

            propAnnot.setPairs(fsArr);
            propAnnot.addToIndexes();
        }
        catch (Exception e) {
            throw new AnalysisEngineProcessException(e);
        }
View Full Code Here

Examples of org.apache.ctakes.ytex.uima.types.Date.addToIndexes()

            Date date = new Date(jCas);
            date.setBegin(anno.getBegin());
            date.setEnd(anno.getEnd());
            date.setDate(tlDateFormat.get().format(
                span.getBeginCalendar().getTime()));
            date.addToIndexes();
          }
        } catch (Exception e) {
          if (log.isDebugEnabled())
            log.debug(
                "chronic failed on: " + anno.getCoveredText(),
View Full Code Here

Examples of org.apache.ctakes.ytex.uima.types.DocKey.addToIndexes()

    kvp.setKey("instance_id");
    kvp.setValueLong(key);
    FSArray fsa = new FSArray(jCas, 1);
    fsa.set(0, kvp);
    docKey.setKeyValuePairs(fsa);
    docKey.addToIndexes();
    // run the analysis engine
    engine.process(jCas);
    DataSource ds = ctx.getBean(DataSource.class);
    Properties ytexProperties = (Properties) ctx.getBean("ytexProperties");
    String schema = ytexProperties.getProperty("db.schema");
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.