public class LabelAwareUimaSentenceIterator extends UimaSentenceIterator implements LabelAwareSentenceIterator
path, reader, sentences
preProcessor
Constructor and Description |
---|
LabelAwareUimaSentenceIterator(SentencePreProcessor preProcessor,
java.lang.String path,
UimaResource resource) |
LabelAwareUimaSentenceIterator(java.lang.String path,
org.apache.uima.analysis_engine.AnalysisEngine engine) |
Modifier and Type | Method and Description |
---|---|
static LabelAwareSentenceIterator |
createWithPath(java.lang.String path)
Creates a uima sentence iterator with the given path
|
java.lang.String |
currentLabel()
Returns the current label for nextSentence()
|
java.util.List<java.lang.String> |
currentLabels()
For multi label problems
|
getResource, hasNext, nextSentence, reset, segmenter
finish, getPreProcessor, setPreProcessor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
finish, getPreProcessor, hasNext, nextSentence, reset, setPreProcessor
public LabelAwareUimaSentenceIterator(SentencePreProcessor preProcessor, java.lang.String path, UimaResource resource)
public LabelAwareUimaSentenceIterator(java.lang.String path, org.apache.uima.analysis_engine.AnalysisEngine engine) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
public java.lang.String currentLabel()
currentLabel
in interface LabelAwareSentenceIterator
public static LabelAwareSentenceIterator createWithPath(java.lang.String path) throws java.lang.Exception
path
- the path to the root directory or file to read fromjava.lang.Exception
public java.util.List<java.lang.String> currentLabels()
LabelAwareSentenceIterator
currentLabels
in interface LabelAwareSentenceIterator