return features;
}
public List<Feature> extractForNode(JCas jCas, IdentifiedAnnotation mention, String ftrPrefix) {
List<Feature> features = new ArrayList<Feature>();
ConllDependencyNode mentionHeadNode = DependencyParseUtils.findAnnotationHead(jCas, mention);
if (mentionHeadNode != null) {
ConllDependencyNode dependsOn = mentionHeadNode.getHead();
if (dependsOn != null) {
features.add(new Feature(ftrPrefix + "_DEPENDS_ON_WORD", dependsOn.getCoveredText()));
features.add(new Feature(ftrPrefix + "_DEPENDS_ON_POS", dependsOn.getPostag()));
// Following features come from Zhou et al. 2005
// ET1DW1: combination of the entity type and the dependent word for M1
features.add(new Feature(ftrPrefix + "_TYPE-GOVERNING_WORD", String.format("%d-%s", mention.getTypeID(), dependsOn.getCoveredText())));
// H1DW1: combination of the head word and the dependent word for M1
features.add(new Feature(ftrPrefix + "_HEAD_WORD-GOVERNING_WORD", String.format("%s-%s", mentionHeadNode.getCoveredText(), dependsOn.getCoveredText())));
features.add(new Feature(ftrPrefix + "_TYPE-GOVERNING_POS", String.format("%d-%s", mention.getTypeID(), dependsOn.getPostag())));
features.add(new Feature(ftrPrefix + "_HEAD_POS-GOVERNING_POS", String.format("%s-%s", mentionHeadNode.getPostag(), dependsOn.getPostag())));
}
}
return features;
}