public class PlainToTokenParser extends Object implements edu.illinois.cs.cogcomp.lbjava.parse.Parser
Words in the representation created
by another Parser and creates a new representation
consisting of Tokens. The input parser is actually expected to
return a LinkedVector populated by
Words with each call to Parser.next().
The Tokens returned by calls to this class's next()
method are also contained in LinkedVectors representing
sentences which are accessible via the
LinkedChild.parent field.| Modifier and Type | Field and Description |
|---|---|
protected Token |
next
The next token to return.
|
protected edu.illinois.cs.cogcomp.lbjava.parse.Parser |
parser
A parser creating a representation consisting of
Words. |
| Constructor and Description |
|---|
PlainToTokenParser(edu.illinois.cs.cogcomp.lbjava.parse.Parser p)
The only constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Frees any resources this parser may be holding.
|
Object |
next()
This method returns
Tokens until the input is exhausted, at
which point it returns null. |
void |
reset()
Sets this parser back to the beginning of the raw data.
|
protected edu.illinois.cs.cogcomp.lbjava.parse.Parser parser
Words.protected Token next
public PlainToTokenParser(edu.illinois.cs.cogcomp.lbjava.parse.Parser p)
p - A parser creating a representation consisting of
Words.public Object next()
Tokens until the input is exhausted, at
which point it returns null.next in interface edu.illinois.cs.cogcomp.lbjava.parse.Parserpublic void reset()
reset in interface edu.illinois.cs.cogcomp.lbjava.parse.Parserpublic void close()
close in interface edu.illinois.cs.cogcomp.lbjava.parse.ParserCopyright © 2017. All rights reserved.