public class PlainToTokenParser extends Object implements edu.illinois.cs.cogcomp.lbjava.parse.Parser
Word
s in the representation created
by another Parser
and creates a new representation
consisting of Token
s. The input parser is actually expected to
return a LinkedVector
populated by
Word
s with each call to Parser.next()
.
The Token
s returned by calls to this class's next()
method are also contained in LinkedVector
s 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
Word s. |
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
Token s 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
Word
s.protected Token next
public PlainToTokenParser(edu.illinois.cs.cogcomp.lbjava.parse.Parser p)
p
- A parser creating a representation consisting of
Word
s.public Object next()
Token
s until the input is exhausted, at
which point it returns null
.next
in interface edu.illinois.cs.cogcomp.lbjava.parse.Parser
public void reset()
reset
in interface edu.illinois.cs.cogcomp.lbjava.parse.Parser
public void close()
close
in interface edu.illinois.cs.cogcomp.lbjava.parse.Parser
Copyright © 2017. All rights reserved.