if ( isDonorTerm(tok) ) {
vfeat.put(DONOR_TOKEN, true);
// check if there are one-removed dependencies on the dependency path
DependencyPath path = DependencyUtility.getPath(jCas, DependencyUtility.getNominalHeadNode(jCas,tok),
DependencyUtility.getNominalHeadNode(jCas,mention));
int commonInd = path.indexOf(path.getCommonNode());
if (commonInd==1 || commonInd==path.size()-2) {
vfeat.put(DONOR_DEPTOK, true);
}
}
if ( isFamilyTerm(tok) ) {
vfeat.put(FAMILY_TOKEN, true);
// check if there are one-removed dependencies on the dependency path
DependencyPath path = DependencyUtility.getPath(jCas, DependencyUtility.getNominalHeadNode(jCas,tok),
DependencyUtility.getNominalHeadNode(jCas,mention));
// 6/28/13 srh fixing for null pointer exception
if (path != null) {
int commonInd = path.indexOf(path.getCommonNode());
if (commonInd==1 || commonInd==path.size()-2) {
vfeat.put(FAMILY_DEPTOK, true);
}
}
}
if ( isOtherTerm(tok) ) {
vfeat.put(OTHER_TOKEN, true);
// check if there are one-removed dependencies on the dependency path
DependencyPath path = DependencyUtility.getPath(jCas, DependencyUtility.getNominalHeadNode(jCas,tok),
DependencyUtility.getNominalHeadNode(jCas,mention));
int commonInd = path.indexOf(path.getCommonNode());
if (commonInd==1 || commonInd==path.size()-2) {
vfeat.put(OTHER_DEPTOK, true);
}
}
}
return vfeat;