/* * splitter.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, 11 Oct 2001 * * $Id: split.jape,v 1.2 2006/04/05 17:02:47 nirajaswani Exp $ */ Phase:split Input: Token Split Options: control = first //Macro:SPLIT2 //( // {CR} //) //Macro: ABBREV1 //( // {Lookup.majorType=="abbreviation"} (FULLSTOP) //) //Macro: ABBREV2 //({Token.orth=="upperInitial", Token.length=="1"} FULLSTOP) //Macro: ABBREV //(ABBREV1 | ABBREV2) //Macro: SENTENCE //( // ({Fake}|{Token}) // ({Fake}|{Token})* //) //sentence that consumes a split Rule: r1 ( ({Token})+ {Split.kind == "internal"} ) :sentence --> :sentence.Sentence = {} //sentence that doesn't consume a split Rule: r2 ( ({Token})+ ):sentence ({Split.kind == "external"}) --> :sentence.Sentence = {}