/* * first.jape * * Copyright (c) 1998-2001, The University of Sheffield. * * 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). * * Diana Maynard, 10 Sep 2001 * * $Id: first.jape,v 1.1 2004/09/10 13:33:24 akshay Exp $ */ Phase: First Input: Token SpaceToken Options: control = appelt // this has to be run first of all // contains any macros etc needed only for standard grammars ////////////////////////////////////////////////////////////// Macro: SPACE // space // control // space control // control space ( ({SpaceToken.kind == space} ({SpaceToken.kind == control})? ({SpaceToken.kind == control})? ) | ({SpaceToken.kind == control} ({SpaceToken.kind == control})? ({SpaceToken.kind == space})? ) ) Macro: INITIAL ( ({Token.orth == upperInitial, Token.length =="1"} ({Token.string == "."})? )+ ) Macro:INITIALS ( ({Token.orth == upperInitial, Token.length =="1"} {Token.string == "."}) ({Token.orth == upperInitial, Token.length =="1"} {Token.string == "."})+ ) Rule: NotUpper Priority: 100 ( INITIAL | INITIALS ):initials --> :initials.Initials = {} Rule: UPPER ( ({Token.category == NNP} //| // {Token.orth == upperInitial}| // {Token.orth == mixedCaps} ) ({Token.string == "-"} {Token.category == NNP} )? ) :upper --> :upper.Upper = {rule = Upper}