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

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

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

IdentifiedAnnotation.setBegin介绍

暂无

代码示例

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

/** @generated
 * @param jcas JCas to which this Feature Structure belongs
 * @param begin offset to the begin spot in the SofA
 * @param end offset to the end spot in the SofA 
*/  
public IdentifiedAnnotation(JCas jcas, int begin, int end) {
 super(jcas);
 setBegin(begin);
 setEnd(end);
 readObject();
}

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

/** @generated
 * @param jcas JCas to which this Feature Structure belongs
 * @param begin offset to the begin spot in the SofA
 * @param end offset to the end spot in the SofA 
*/  
public IdentifiedAnnotation(JCas jcas, int begin, int end) {
 super(jcas);
 setBegin(begin);
 setEnd(end);
 readObject();
}

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

/** @generated
 * @param jcas JCas to which this Feature Structure belongs
 * @param begin offset to the begin spot in the SofA
 * @param end offset to the end spot in the SofA 
*/  
public IdentifiedAnnotation(JCas jcas, int begin, int end) {
 super(jcas);
 setBegin(begin);
 setEnd(end);
 readObject();
}

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

/** @generated
 * @param jcas JCas to which this Feature Structure belongs
 * @param begin offset to the begin spot in the SofA
 * @param end offset to the end spot in the SofA 
*/  
public IdentifiedAnnotation(JCas jcas, int begin, int end) {
 super(jcas);
 setBegin(begin);
 setEnd(end);
 readObject();
}

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

identifiedAnnotation.setBegin(sortedTreebankNodes.get(0).getBegin());
identifiedAnnotation.setEnd(sortedTreebankNodes.get(0).getEnd());

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

identifiedAnnotation.setBegin(sortedTreebankNodes.get(0).getBegin());
identifiedAnnotation.setEnd(sortedTreebankNodes.get(0).getEnd());

代码示例来源: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

IdentifiedAnnotation neAnnot = new MedicationMention( jcas ); // medication NEs are EventMention
neAnnot.setTypeID( CONST.NE_TYPE_ID_DRUG );
neAnnot.setBegin( neBegin );
neAnnot.setEnd( neEnd );
neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );

代码示例来源: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: apache/ctakes

IdentifiedAnnotation neAnnot = new MedicationMention( jcas ); // medication NEs are EventMention
neAnnot.setTypeID( CONST.NE_TYPE_ID_DRUG );
neAnnot.setBegin( neBegin );
neAnnot.setEnd( neEnd );
neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );

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

annotation.setBegin( spanCuis.getKey().getStart() );
annotation.setEnd( spanCuis.getKey().getEnd() );
annotation.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );

代码示例来源: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

annotation.setBegin( spanCuis.getKey().getStart() );
annotation.setEnd( spanCuis.getKey().getEnd() );
annotation.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );

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

neAnnot.setBegin( neBegin );
neAnnot.setEnd( neEnd );
neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );

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

neAnnot.setBegin( neBegin );
neAnnot.setEnd( neEnd );
neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );

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

neAnnot.setBegin( neBegin );
neAnnot.setEnd( neEnd );
neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );

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

neAnnot.setBegin( neBegin );
neAnnot.setEnd( neEnd );
neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );

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

IdentifiedAnnotation m = (IdentifiedAnnotation) ctor.newInstance(jCas);
m.setBegin(mention.getBegin());
m.setEnd(mention.getEnd());
for (Selector s : msg.keySet()) {

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

IdentifiedAnnotation m = (IdentifiedAnnotation) ctor.newInstance(jCas);
m.setBegin(mention.getBegin());
m.setEnd(mention.getEnd());
for (Selector s : msg.keySet()) {

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

mention.setBegin(original.getBegin());
mention.setEnd(original.getEnd());
mention.setConditional(original.getConditional());

相关文章

微信公众号

最新文章

更多