Phase: Mathematician Input: Token Lookup Options: control = appelt Rule: Mathematician // Leonhard Euler ( {Lookup.majorType == mathematician, Lookup.minorType == long} ):mathematician --> { //System.out.println(bindings.toString()); //System.out.println(bindings.containsKey("person")); //System.out.println(bindings.containsKey("mathematician")); gate.AnnotationSet person = (gate.AnnotationSet)bindings.get("mathematician"); //System.out.println(person.toString()); gate.Annotation personAnn = (gate.Annotation)person.iterator().next(); gate.FeatureMap features = Factory.newFeatureMap(); features.put("rule", "Mathematician"); annotations.add(person.firstNode(), person.lastNode(), "Mathematician", features); annotations.add(person.firstNode(), person.lastNode(), "Person", features); } Rule: Mathematician2 // Euler ( {Lookup.majorType == mathematician, Lookup.minorType == short} ):mathematician --> { //System.out.println(bindings.toString()); //System.out.println(bindings.containsKey("person")); //System.out.println(bindings.containsKey("mathematician")); gate.AnnotationSet person = (gate.AnnotationSet)bindings.get("mathematician"); //System.out.println(person.toString()); gate.Annotation personAnn = (gate.Annotation)person.iterator().next(); gate.FeatureMap features = Factory.newFeatureMap(); features.put("rule", "Mathematician"); annotations.add(person.firstNode(), person.lastNode(), "Mathematician", features); annotations.add(person.firstNode(), person.lastNode(), "Person", features); }