public class PennTreebankReader extends TextAnnotationReader
Modifier and Type | Field and Description |
---|---|
protected String |
combinedWSJHome |
protected int |
currentSectionId |
static String |
PENN_TREEBANK_WSJ |
protected String[] |
sections |
corpusName, currentAnnotationId
Constructor and Description |
---|
PennTreebankReader(String treebankHome)
Reads all the sections of the combined annotation from penn treebank
|
PennTreebankReader(String treebankHome,
String parseViewName)
Reads all the sections of the combined annotation from penn treebank
|
PennTreebankReader(String treebankHome,
String[] sections)
Reads the specified sections from penn treebank
|
PennTreebankReader(String treebankHome,
String[] sections,
String parseViewName)
Reads the specified sections from penn treebank
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
protected void |
initializeReader() |
protected TextAnnotation |
makeTextAnnotation() |
void |
remove() |
iterator, next, reset
public static final String PENN_TREEBANK_WSJ
protected final String[] sections
protected final String combinedWSJHome
protected int currentSectionId
public PennTreebankReader(String treebankHome) throws Exception
treebankHome
- The directory that points to the merged (mrg) files of the WSJ portionException
public PennTreebankReader(String treebankHome, String parseViewName) throws Exception
treebankHome
- The directory that points to the merged (mrg) files of the WSJ portionparseViewName
- The name of the parse view which is to be addedException
public PennTreebankReader(String treebankHome, String[] sections) throws Exception
treebankHome
- The directory that points to the merged (mrg) files of the WSJ portionException
protected void initializeReader()
initializeReader
in class TextAnnotationReader
public boolean hasNext()
protected TextAnnotation makeTextAnnotation()
makeTextAnnotation
in class TextAnnotationReader
public void remove()
remove
in interface Iterator<TextAnnotation>
remove
in class TextAnnotationReader
Copyright © 2015. All rights reserved.