List features = new ArrayList();
features.addAll(super.getFeatures(mention, entity));
if (entity != null) {
features.addAll(getPronounMatchFeatures(mention,entity));
List contexts = 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 ccontexts = 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);
}