edu.stanford.nlp.trees.international.pennchinese
Class FragDiscardingPennTreeReader
java.lang.Object
edu.stanford.nlp.trees.PennTreeReader
edu.stanford.nlp.trees.international.pennchinese.FragDiscardingPennTreeReader
- All Implemented Interfaces:
- TreeReader
public class FragDiscardingPennTreeReader
- extends PennTreeReader
- Author:
- Galen Andrew
Method Summary |
Tree |
readTree()
Reads a single tree in standard Penn Treebank format,
with or without an additional set of parens around it (an unnamed
ROOT node). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FragDiscardingPennTreeReader
public FragDiscardingPennTreeReader(Reader in,
TreeFactory tf,
TreeNormalizer tn,
Tokenizer tk)
readTree
public Tree readTree()
throws IOException
- Description copied from class:
PennTreeReader
- Reads a single tree in standard Penn Treebank format,
with or without an additional set of parens around it (an unnamed
ROOT node). If the token stream ends before the current tree is complete, a
NoSuchElementException
will get thrown from
deep within the innards of this method.
- Specified by:
readTree
in interface TreeReader
- Overrides:
readTree
in class PennTreeReader
- Returns:
- A single tree, or
null
at end of token stream.
- Throws:
IOException
Stanford NLP Group