IndexedWord parent = dependency.getParent(headIndexedWord);
if (parent != null) {
if(dict.modals.contains(parent.lemma())) return 1;
// check the children of the parent (that is needed for modal auxiliaries)
IndexedWord child = dependency.getChildWithReln(parent,EnglishGrammaticalRelations.AUX_MODIFIER);
if(!dependency.hasParentWithReln(headIndexedWord, EnglishGrammaticalRelations.NOMINAL_SUBJECT) && child != null && dict.modals.contains(child.lemma())) return 1;
}
// look at the path to root
List<IndexedWord> path = dependency.getPathToRoot(headIndexedWord);
if(path == null) return 0;