org.apache.uima.jcas.tcas.Annotation.getTypeIndexID()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(96)

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

Annotation.getTypeIndexID介绍

暂无

代码示例

代码示例来源:origin: CLLKazan/UIMA-Ext

private boolean isSWAfter(FSIterator<Annotation> tokensIter) {
  Annotation tokenAfter = lookupNext(tokensIter);
  if (tokenAfter == null) {
    return false;
  }
  return tokenAfter.getTypeIndexID() == SW.type;
}

代码示例来源:origin: de.unistuttgart.ims/uimautil

@Override
  public void process(JCas jcas) throws AnalysisEngineProcessException {
    try {
      Annotation a = clazz.getConstructor(JCas.class).newInstance(jcas);
      if (includeSubtypes)
        jcas.removeAllIncludingSubtypes(a.getTypeIndexID());
      else
        jcas.removeAllExcludingSubtypes(a.getTypeIndexID());
    } catch (Exception e) {
      throw new AnalysisEngineProcessException(e);
    }
  }
}

代码示例来源:origin: de.tudarmstadt.ukp.dkpro.core/de.tudarmstadt.ukp.dkpro.core.io.tei-asl

if (aAnnotation.getTypeIndexID() == Token.type) {
  if (cTextPattern.matcher(aAnnotation.getCoveredText()).matches()) {
    return Optional.of(TAG_CHARACTER);
else if (aAnnotation.getTypeIndexID() == Sentence.type) {
  return Optional.of(TAG_SUNIT);
else if (aAnnotation.getTypeIndexID() == Paragraph.type) {
  return Optional.of(TAG_PARAGRAPH);

代码示例来源:origin: de.julielab/jcore-jnet-ae

annotationIterators.add(indexes.getAnnotationIndex(ann.getTypeIndexID()).iterator());
} catch (Exception e) {
  throw new AnalysisEngineProcessException(e);

代码示例来源:origin: CLLKazan/UIMA-Ext

private boolean isAbbreviationBefore(FSIterator<Annotation> tokensIter) {
  Annotation tokenBefore = lookupPrevious(tokensIter);
  if (tokenBefore == null) {
    return false;
  }
  return tokenBefore.getTypeIndexID() == CW.type &&
      tokenBefore.getEnd() - tokenBefore.getBegin() == 1;
}

相关文章