IndexedWord t = dependency.getNodeByWordPattern(word);
for(Pair<GrammaticalRelation,IndexedWord> child : dependency.childPairs(t)){
if(child.first().getShortName().equals("nsubj")) {
int subjectIndex = child.second().index(); // start from 1
IntTuple headPosition = new IntTuple(2);
headPosition.set(0, paragraph.size()-1 + paragraphOffset);
headPosition.set(1, subjectIndex-1);
if(mentionheadPositions.containsKey(headPosition)
&& mentionheadPositions.get(headPosition).nerString.startsWith("PER")) {
speaker = Integer.toString(mentionheadPositions.get(headPosition).mentionID);
}
}