public class FragDiscardingPennTreeReader extends PennTreeReader
| Constructor and Description |
|---|
FragDiscardingPennTreeReader(java.io.Reader in,
TreeFactory tf,
TreeNormalizer tn,
Tokenizer<java.lang.String> tk) |
| Modifier and Type | Method and Description |
|---|---|
Tree |
readTree()
Reads a single tree in standard Penn Treebank format from the
input stream.
|
close, mainpublic FragDiscardingPennTreeReader(java.io.Reader in,
TreeFactory tf,
TreeNormalizer tn,
Tokenizer<java.lang.String> tk)
public Tree readTree() throws java.io.IOException
PennTreeReaderIOException.
Note that the method will skip malformed trees and attempt to
read additional trees from the input stream. It is possible, however,
that a malformed tree will corrupt the token stream. In this case,
an IOException will eventually be thrown.
readTree in interface TreeReaderreadTree in class PennTreeReadernull at end of token stream.java.io.IOException - If I/O problem