public class ChunkedSentencePattern extends Object
| Constructor and Description |
|---|
ChunkedSentencePattern() |
| Modifier and Type | Method and Description |
|---|---|
static edu.washington.cs.knowitall.regex.RegularExpression<ChunkedSentenceToken> |
compile(String regex)
This class compiles regular expressions over the ChunkedSentenceTokens in
a sentence into an NFA.
|
static void |
main(String[] args) |
public static edu.washington.cs.knowitall.regex.RegularExpression<ChunkedSentenceToken> compile(String regex)
<pos="NNPS?"> is equivalent to "<pos="NNP" | pos="NNPS">
and (?:<pos="NNP"> | <pos="NNPS">).
Here are some equivalent examples:
<pos="JJ">* <pos="NNP.">+
<pos="JJ">* <pos="NNPS?">+
<pos="JJ">* <pos="NNP" | pos="NNPS">+
<pos="JJ">* (?:<pos="NNP"> | <pos="NNPS">)+
The Regular Expressions support named groups (
regex - public static void main(String[] args) throws ChunkerException, IOException
ChunkerExceptionIOExceptionCopyright © 2010-2013 University of Washington CSE. All Rights Reserved.