我試圖提取由默認ANNIE處理資源生成的註釋集的單個文本值。Gate - 從註釋集中提取單個註釋文本
當我遍歷註釋集時,每個條目只給出註釋引用但不給出.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(); (「type」,entityAnn.getType()); outputAS.add(entityAnn.getStartNode(),entityAnn.getEndNode(), 「Entity」,features);' –