public class PtbTreeInputCodec extends InputCodec<Tree<String>>
(S (NP John) (VP (VB sleeps)))
| Constructor and Description |
|---|
PtbTreeInputCodec() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
optionExtraBrackets() |
Tree<String> |
read(InputStream is)
Reads a single tree in PTB format.
|
List<Tree<String>> |
readCorpus(InputStream is)
Reads a whole corpus of PTB trees and returns the trees as a list.
|
addOptions, getAllInputCodecs, getInputCodecByExtension, getInputCodecByName, getInputCodecByNameOrExtension, getInputCodecs, getMetadata, getOption, hasTrueOption, main, read, setOption, setProgressListenerpublic Tree<String> read(InputStream is) throws CodecParseException, IOException
read in class InputCodec<Tree<String>>is - CodecParseExceptionIOExceptionpublic boolean optionExtraBrackets()
public List<Tree<String>> readCorpus(InputStream is) throws CodecParseException, IOException
is - CodecParseExceptionIOExceptionCopyright © 2017. All rights reserved.