org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation.addToIndexes()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation.addToIndexes()方法的一些代码示例,展示了IdentifiedAnnotation.addToIndexes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IdentifiedAnnotation.addToIndexes()方法的具体详情如下:
包路径:org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation
类名称:IdentifiedAnnotation
方法名:addToIndexes

IdentifiedAnnotation.addToIndexes介绍

暂无

代码示例

代码示例来源:origin: org.apache.ctakes/ctakes-assertion

eMention.addToIndexes();

代码示例来源:origin: apache/ctakes

private void addNamedEntity(JCas jcas, int begin, int end,
    Map<String, OntologyConcept> concepts, boolean bMedication,
    Set<NegSpan> negSet) {
  if (concepts.isEmpty())
    return;
  IdentifiedAnnotation neLast = bMedication ? new MedicationEventMention(
      jcas) : new EntityMention(jcas);
  neLast.setPolarity(negSet.contains(new NegSpan(begin, end)) ? CONST.NE_POLARITY_NEGATION_PRESENT
      : CONST.NE_POLARITY_NEGATION_ABSENT);
  neLast.setBegin(begin);
  neLast.setEnd(end);
  FSArray ocArr = new FSArray(jcas, concepts.size());
  int ocArrIdx = 0;
  for (OntologyConcept oc : concepts.values()) {
    // set the cui field if this is in fact a cui
    ocArr.set(ocArrIdx, oc);
    ocArrIdx++;
  }
  neLast.setOntologyConceptArr(ocArr);
  concepts.clear();
  neLast.addToIndexes();
}

代码示例来源:origin: org.apache.ctakes/ctakes-ytex-uima

private void addNamedEntity(JCas jcas, int begin, int end,
    Map<String, OntologyConcept> concepts, boolean bMedication,
    Set<NegSpan> negSet) {
  if (concepts.isEmpty())
    return;
  IdentifiedAnnotation neLast = bMedication ? new MedicationEventMention(
      jcas) : new EntityMention(jcas);
  neLast.setPolarity(negSet.contains(new NegSpan(begin, end)) ? CONST.NE_POLARITY_NEGATION_PRESENT
      : CONST.NE_POLARITY_NEGATION_ABSENT);
  neLast.setBegin(begin);
  neLast.setEnd(end);
  FSArray ocArr = new FSArray(jcas, concepts.size());
  int ocArrIdx = 0;
  for (OntologyConcept oc : concepts.values()) {
    // set the cui field if this is in fact a cui
    ocArr.set(ocArrIdx, oc);
    ocArrIdx++;
  }
  neLast.setOntologyConceptArr(ocArr);
  concepts.clear();
  neLast.addToIndexes();
}

代码示例来源:origin: org.apache.ctakes/ctakes-dictionary-lookup

neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
 neAnnot.setOntologyConceptArr( ocArr );
 neAnnot.addToIndexes();
} else {
 iv_logger.warn( "Filtered out: " + text );

代码示例来源:origin: apache/ctakes

neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
 neAnnot.setOntologyConceptArr( ocArr );
 neAnnot.addToIndexes();
} else {
 iv_logger.warn( "Filtered out: " + text );

代码示例来源:origin: org.apache.ctakes/ctakes-dictionary-lookup-fast

annotation.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
annotation.setOntologyConceptArr( conceptArr );
annotation.addToIndexes();

代码示例来源:origin: apache/ctakes

eMention.addToIndexes();

代码示例来源:origin: apache/ctakes

annotation.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
annotation.setOntologyConceptArr( conceptArr );
annotation.addToIndexes();

代码示例来源:origin: apache/ctakes

@Override
public void process(JCas jcas) throws AnalysisEngineProcessException {
  // Create a dummy IdentifiedAnnotation in the type system
  // If the BaseToken Part Of Speech is a Noun
  Collection<BaseToken> tokens = JCasUtil.select(jcas, BaseToken.class);
  for (BaseToken token : tokens) {
    if (saveAnnotation && token.getPartOfSpeech() != null
        && token.getPartOfSpeech().startsWith("N")) {
      IdentifiedAnnotation ann = new IdentifiedAnnotation(jcas);
      ann.setBegin(token.getBegin());
      ann.setEnd(token.getEnd());
      ann.addToIndexes();
      if (printAnnotation) {
        LOG.info("Token:" + token.getCoveredText() + " POS:"
            + token.getPartOfSpeech());
      }
    }
  }
}

代码示例来源:origin: apache/ctakes

mention.addToIndexes();
idAnnotationMap.put(annotation.id, mention);

代码示例来源:origin: org.apache.ctakes/ctakes-dictionary-lookup

neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
neAnnot.setOntologyConceptArr( conceptArr );
neAnnot.addToIndexes();

代码示例来源:origin: apache/ctakes

mention.addToIndexes();
idAnnotationMap.put(annotation.id, mention);

代码示例来源:origin: org.apache.ctakes/ctakes-core

mention.addToIndexes();
idAnnotationMap.put(annotation.id, mention);

代码示例来源:origin: org.apache.ctakes/ctakes-assertion

mention.addToIndexes();
idAnnotationMap.put(annotation.id, mention);

代码示例来源:origin: org.apache.ctakes/ctakes-dictionary-lookup

neAnnot.setOntologyConceptArr( ocArr );
neAnnot.setTypeID( typeId );
neAnnot.addToIndexes();

代码示例来源:origin: apache/ctakes

neAnnot.setOntologyConceptArr( ocArr );
neAnnot.setTypeID( typeId );
neAnnot.addToIndexes();

代码示例来源:origin: org.apache.ctakes/ctakes-assertion

m.addToIndexes(jCas);

代码示例来源:origin: apache/ctakes

m.addToIndexes(jCas);

代码示例来源:origin: org.apache.ctakes/ctakes-assertion

entityOrEventMention.addToIndexes();
logger.info("  end assertion");

代码示例来源:origin: apache/ctakes

annotation.addToIndexes();
return annotation;

相关文章

微信公众号

最新文章

更多