org.cleartk.token.tokenizer
Class PennTreebankTokenizer
java.lang.Object
org.cleartk.token.tokenizer.Tokenizer_ImplBase
org.cleartk.token.tokenizer.PennTreebankTokenizer
- All Implemented Interfaces:
- Tokenizer
public class PennTreebankTokenizer
- extends Tokenizer_ImplBase
Copyright (c) 2007-2008, Regents of the University of Colorado
All rights reserved.
- Author:
- Philip Ogren
This code was derived directly (i.e. translated) from a python script that Steven Bethard
gave me called tokenizer.py. This copyright of this script is owned by the Regents of the
University of Colorado and therefore there is no restriction on our use and distribution
of this derivitive work here. The python script was derived from a sed script available
here:
http://www.cis.upenn.edu/~treebank/tokenization.html
Steve's script fixes several misc. errors., Philip Ogren
|
Method Summary |
String[] |
getTokenTexts(String text)
Tokenizes the input text and returns a string array corresponding to the tokens. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
openBracesRegex
public static String openBracesRegex
closedBracesRegex
public static String closedBracesRegex
bracesRegex
public static String bracesRegex
bracesPattern
public static Pattern bracesPattern
ellipsisRegex
public static String ellipsisRegex
ellipsisPattern
public static Pattern ellipsisPattern
commaRegex
public static String commaRegex
commaPattern
public static Pattern commaPattern
dollarSignRegex
public static String dollarSignRegex
dollarSignPattern
public static Pattern dollarSignPattern
ampersandRegex
public static String ampersandRegex
ampersandPattern
public static Pattern ampersandPattern
dashRegex
public static String dashRegex
dashPattern
public static Pattern dashPattern
colonRegex
public static String colonRegex
colonPattern
public static Pattern colonPattern
nonFinalPunctRegex
public static String nonFinalPunctRegex
nonFinalPunctPattern
public static Pattern nonFinalPunctPattern
periodRegex
public static String periodRegex
periodPattern
public static Pattern periodPattern
nonPeriodPunctRegex
public static String nonPeriodPunctRegex
nonPeriodPunctPattern
public static Pattern nonPeriodPunctPattern
singleQuoteRegex
public static String singleQuoteRegex
singleQuotePattern
public static Pattern singleQuotePattern
tripleQuoteRegex
public static String tripleQuoteRegex
tripleQuotePattern
public static Pattern tripleQuotePattern
doubleQuoteRegex
public static String doubleQuoteRegex
doubleQuotePattern
public static Pattern doubleQuotePattern
quoteRegex
public static String quoteRegex
quotePattern
public static Pattern quotePattern
oneWordAbbreviationRegex
public static String oneWordAbbreviationRegex
oneWordAbbreviationPattern
public static Pattern oneWordAbbreviationPattern
twoWordAbbreviationRegexes
public static String[] twoWordAbbreviationRegexes
twoWordAbbreviationPatterns
public static Pattern[] twoWordAbbreviationPatterns
threeWordAbbreviationRegexes
public static String[] threeWordAbbreviationRegexes
threeWordAbbreviationPatterns
public static Pattern[] threeWordAbbreviationPatterns
tAbbreviationRegex
public static String tAbbreviationRegex
tAbbreviationPattern
public static Pattern tAbbreviationPattern
beginOrEndRegex
public static String beginOrEndRegex
beginOrEndPattern
public static Pattern beginOrEndPattern
extraSpaceRegex
public static String extraSpaceRegex
extraSpacePattern
public static Pattern extraSpacePattern
multipleWhitespaceRegex
public static String multipleWhitespaceRegex
multipleWhitespacePattern
public static Pattern multipleWhitespacePattern
patterns
protected Pattern[] patterns
PennTreebankTokenizer
public PennTreebankTokenizer()
getTokenTexts
public String[] getTokenTexts(String text)
- Tokenizes the input text and returns a string array corresponding to the tokens.
- Specified by:
getTokenTexts in class Tokenizer_ImplBase
Copyright © 2012. All Rights Reserved.