public class PennTreebankReader extends AnnotationReader<TextAnnotation>
| Modifier and Type | Field and Description |
|---|---|
protected String |
combinedWSJHome |
protected int |
currentSectionId |
static String |
PENN_TREEBANK_WSJ |
protected String[] |
sections |
corpusName, currentAnnotationId, resourceManager| 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,
String sourceFileExtension,
String annotationFileExtension)
Reads the specified sections from penn treebank
|
| Modifier and Type | Method and Description |
|---|---|
String |
generateReport()
TODO: generate a human-readable report of annotations read from the source file (plus whatever
other relevant statistics the user should know about).
|
boolean |
hasNext()
is there another annotation object to return?
|
protected void |
initializeReader()
called by constructor to perform subclass-specific initialization.
|
TextAnnotation |
next()
return the next annotation object.
|
void |
remove() |
iterator, resetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorforEachRemainingpublic 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 portionExceptionpublic 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 addedExceptionpublic PennTreebankReader(String treebankHome, String[] sections) throws Exception
treebankHome - The directory that points to the merged (mrg) files of the WSJ portionExceptionpublic PennTreebankReader(String treebankHome, String[] sections, String parseViewName, String sourceFileExtension, String annotationFileExtension) throws Exception
treebankHome - The directory that points to the merged (mrg) files of the WSJ portionExceptionprotected void initializeReader()
AnnotationReaderinitializeReader in class AnnotationReader<TextAnnotation>public boolean hasNext()
AnnotationReaderhasNext in interface Iterator<TextAnnotation>hasNext in class AnnotationReader<TextAnnotation>public TextAnnotation next()
next in interface Iterator<TextAnnotation>next in class AnnotationReader<TextAnnotation>public void remove()
remove in interface Iterator<TextAnnotation>remove in class AnnotationReader<TextAnnotation>public String generateReport()
generateReport in class AnnotationReader<TextAnnotation>Copyright © 2017. All rights reserved.