public class DependencyFileCollectionReader
extends CollectionReader_ImplBase
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEPENDENCY_FILE_PARAM
"DependencyFile" is a required, single, string parameter that specifies the
location of a data file that contains dependency data in it.
|
private int |
docCtr |
(package private) java.io.BufferedReader |
input |
static java.lang.String |
INPUT_FORMAT_PARAM
"InputFormat" is a optional, single, boolean parameter that determines
whether or not the features associated with each word will be
loaded into the CAS or not.
|
(package private) java.lang.String |
inputFormat |
(package private) java.lang.String |
line |
static java.lang.String |
TRAINING_MODE_PARAM |
(package private) boolean |
trainingMode |
Constructor and Description |
---|
DependencyFileCollectionReader() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
getNext(CAS cas)
Some of the code in this method is based loosely on
opennlp.tools.postag.POSEventCollector
|
Progress[] |
getProgress() |
boolean |
hasNext() |
void |
initialize() |
private void |
setDependencyNodesFromTabbedText(JCas jCas,
java.util.ArrayList<java.lang.String> lines,
java.lang.StringBuffer documentText,
java.util.ArrayList<ConllDependencyNode> depNodes)
Store the dependency information in ConllDependencyNode-s
|
public static final java.lang.String DEPENDENCY_FILE_PARAM
public static final java.lang.String INPUT_FORMAT_PARAM
public static final java.lang.String TRAINING_MODE_PARAM
java.io.BufferedReader input
java.lang.String line
private int docCtr
java.lang.String inputFormat
boolean trainingMode
public void initialize() throws ResourceInitializationException
ResourceInitializationException
public void getNext(CAS cas) throws java.io.IOException, CollectionException
java.io.IOException
CollectionException
private void setDependencyNodesFromTabbedText(JCas jCas, java.util.ArrayList<java.lang.String> lines, java.lang.StringBuffer documentText, java.util.ArrayList<ConllDependencyNode> depNodes)
jCas
- lines
- documentText
- depNodes
- public void close() throws java.io.IOException
java.io.IOException
public Progress[] getProgress()
public boolean hasNext() throws java.io.IOException, CollectionException
java.io.IOException
CollectionException