* @param entity The entity.
* @return list of distance features for the specified mention and entity.
*/
public static List<String> getDistanceFeatures(MentionContext mention, DiscourseEntity entity) {
List<String> features = new ArrayList<String>();
MentionContext cec = entity.getLastExtent();
int entityDistance = mention.getNounPhraseDocumentIndex()- cec.getNounPhraseDocumentIndex();
int sentenceDistance = mention.getSentenceNumber() - cec.getSentenceNumber();
int hobbsEntityDistance;
if (sentenceDistance == 0) {
hobbsEntityDistance = cec.getNounPhraseSentenceIndex();
}
else {
//hobbsEntityDistance = entityDistance - (entities within sentence from mention to end) + (entities within sentence form start to mention)
//hobbsEntityDistance = entityDistance - (cec.maxNounLocation - cec.getNounPhraseSentenceIndex) + cec.getNounPhraseSentenceIndex;
hobbsEntityDistance = entityDistance + (2 * cec.getNounPhraseSentenceIndex()) - cec.getMaxNounPhraseSentenceIndex();
}
features.add("hd=" + hobbsEntityDistance);
features.add("de=" + entityDistance);
features.add("ds=" + sentenceDistance);
//features.add("ds=" + sdist + pronoun);