/* * mathematician.jape * * Copyright (c) 2005-2006, Men Young Lee. * * This file is part of GATE (see http://gate.ac.uk/), and is free * software, licenced under the GNU Library General Public License, * Version 2, June 1991 (in the distribution as file licence.html, * and also available at http://gate.ac.uk/gate/licence.html). * * Menyoung Lee, 17 Oct 2005 * * $Id: mathematician.jape,v 1.8 2004/07/21 16:57:11 akshay Exp $ */ Phase: Mathematician Input: Token Lookup Options: control = appelt Rule: Mathematician // Fred ( {Lookup.majorType == person, Lookup.minorType == mathematician}| {Lookup.majorType == mathematician} ):mathematician --> { // System.out.println("hi"); System.out.println(bindings.toString()); System.out.println(bindings.containsKey("mathematician")); System.out.println(bindings.containsKey("person")); System.out.println(bindings.get("person").toString()); System.out.println(bindings.get("mathematician").toString()); gate.AnnotationSet mathematician = (gate.AnnotationSet)bindings.get("mathematician"); // gate.Annotation mathematicianAnn = (gate.Annotation)mathematician.iterator().next(); gate.FeatureMap features = Factory.newFeatureMap(); System.out.println("HELLO STUPID"); features.put("rule", "Mathematician"); System.out.println(features.toString()); System.out.println(mathematician.toString()); annotations.add(mathematician.firstNode(), mathematician.lastNode(), "Mathematician", features); }