【发布时间】:2014-02-08 15:27:10
【问题描述】:
我正在尝试提取由默认 ANNIE 处理资源生成的注释集的各个文本值。
当我遍历注解集时,每个条目只给出注解引用的开始和结束位置,但没有给出 .value() 方法。是否有一种简单的方法来获取值,或者我是否需要使用 FileWriter 或类似的方法来直接从我正在使用注释的开始和结束位置处理的语料库中提取值?
annotTypesRequired.add("Location");
Set<Annotation> organization = new HashSet<Annotation>(
defaultAnnotSet.get(annotTypesRequired));
【问题讨论】:
-
类似:
gate.AnnotationSet entityAS = (gate.AnnotationSet)bindings.get("entity"); gate.Annotation entityAnn = (gate.Annotation)entityAS.iterator().next(); gate.FeatureMap features = Factory.newFeatureMap(); features.put("type", entityAnn.getType());outputAS.add(entityAnn.getStartNode(), entityAnn.getEndNode(), "Entity“, features);
标签: java filewriter gate