List<String> features = new ArrayList<String>();
features.addAll(super.getFeatures(mention, entity));
if (entity != null) {
features.addAll(ResolverUtils.getPronounMatchFeatures(mention,entity));
List<String> contexts = ResolverUtils.getContextFeatures(mention);
MentionContext cec = entity.getLastExtent();
if (mention.getHeadTokenTag().startsWith("PRP") && cec.getHeadTokenTag().startsWith("PRP")) {
features.add(mention.getHeadTokenText() + "," + cec.getHeadTokenText());
}
else if (mention.getHeadTokenText().startsWith("NNP")) {
for (int ci = 0, cl = contexts.size(); ci < cl; ci++) {
features.add(contexts.get(ci));
}
features.add(mention.getNameType() + "," + cec.getHeadTokenText());
}
else {
List<String> ccontexts = ResolverUtils.getContextFeatures(cec);
for (int ci = 0, cl = ccontexts.size(); ci < cl; ci++) {
features.add(ccontexts.get(ci));
}
features.add(cec.getNameType() + "," + mention.getHeadTokenText());
}
}
return (features);
}