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

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

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

Annotation.getIntValue介绍

暂无

代码示例

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

private static Object getFeatureValue(Feature feature,
    Class<? extends Object> class1, Annotation annotation) throws ResourceProcessException {
  if(class1 == Integer.class){
    return annotation.getIntValue(feature);
  }else if(class1 == String.class){
    return annotation.getStringValue(feature);
  }else if(class1 == Boolean.class){
    return annotation.getBooleanValue(feature);
  }else{
    throw new ResourceProcessException("Received a class type that I'm not familiar with: ", new Object[]{class1});
  }
}

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

private static Object getFeatureValue(Feature feature,
    Class<? extends Object> class1, Annotation annotation) throws ResourceProcessException {
  if(class1 == Integer.class){
    return annotation.getIntValue(feature);
  }else if(class1 == String.class){
    return annotation.getStringValue(feature);
  }else if(class1 == Boolean.class){
    return annotation.getBooleanValue(feature);
  }else{
    throw new ResourceProcessException("Received a class type that I'm not familiar with: ", new Object[]{class1});
  }
}

代码示例来源:origin: ch.epfl.bbp.nlp/bluima_mongodb

static void writeFieldToDb(String range, BasicDBObject o, Annotation a,
    String dbKey, Feature f) {
  if (range.equals("String")) {
    o.put(dbKey, a.getStringValue(f));
  } else if (range.equals("StringArray")) {
    StringArray sa = (StringArray) a.getFeatureValue(f);
    if (sa != null) {
      String[] vals = sa.toArray();
      o.put(dbKey, Lists.newArrayList(vals));
    }
  } else if (range.equals("Integer")) {
    o.put(dbKey, a.getIntValue(f));
  } else if (range.equals("Float")) {
    o.put(dbKey, a.getFloatValue(f));
  } else if (range.equals("Boolean")) {
    o.put(dbKey, a.getBooleanValue(f));
  } else {
    LOG.warn("range not supported " + range);
  }
}

代码示例来源:origin: de.unistuttgart.ims/cleartk-util

newAnnotation.setStringValue(f, a.getStringValue(f));
} else if (rangeName.equals("uima.cas.Integer")) {
  newAnnotation.setIntValue(f, a.getIntValue(f));
} else if (rangeName.equals("uima.cas.Double")) {
  newAnnotation.setDoubleValue(f, a.getDoubleValue(f));

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

p.print(anno.getFeatureValueAsString(feature));
} else if (feature.getRange().getName().equals("uima.cas.Integer")) {
  p.print(anno.getIntValue(feature));
} else if (feature.getRange().getName().equals("uima.cas.Double")) {
  p.print(anno.getDoubleValue(feature));

代码示例来源:origin: uk.gov.dstl.baleen/baleen-uima

break;
case CAS.TYPE_NAME_INTEGER:
 ret = a.getIntValue(f);
 break;
case CAS.TYPE_NAME_FLOAT:

代码示例来源:origin: dstl/baleen

break;
case CAS.TYPE_NAME_INTEGER:
 ret = a.getIntValue(f);
 break;
case CAS.TYPE_NAME_FLOAT:

相关文章