private void addFoundPair(Tree np1, Tree np2, Tree t,
Set<Pair<Integer, Integer>> foundPairs) {
Tree head1 = np1.headTerminal(headFinder);
Tree head2 = np2.headTerminal(headFinder);
int h1 = ((CoreMap) head1.label()).get(CoreAnnotations.IndexAnnotation.class) - 1;
int h2 = ((CoreMap) head2.label()).get(CoreAnnotations.IndexAnnotation.class) - 1;
Pair<Integer, Integer> p = new Pair<Integer, Integer>(h1, h2);
foundPairs.add(p);
}
private static final TregexPattern appositionPattern = TregexPattern.compile("NP=m1 < (NP=m2 $.. (/,/ $.. NP=m3))");