public class LabelAwareUimaSentenceIterator extends UimaSentenceIterator implements LabelAwareSentenceIterator
path, reader, sentences
preProcessor
Constructor and Description |
---|
LabelAwareUimaSentenceIterator(SentencePreProcessor preProcessor,
String path,
UimaResource resource) |
LabelAwareUimaSentenceIterator(String path,
org.apache.uima.analysis_engine.AnalysisEngine engine) |
Modifier and Type | Method and Description |
---|---|
static LabelAwareSentenceIterator |
createWithPath(String path)
Creates a uima sentence iterator with the given path
|
String |
currentLabel()
Returns the current label for nextSentence()
|
List<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, String path, UimaResource resource)
public LabelAwareUimaSentenceIterator(String path, org.apache.uima.analysis_engine.AnalysisEngine engine) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
public String currentLabel()
currentLabel
in interface LabelAwareSentenceIterator
public static LabelAwareSentenceIterator createWithPath(String path) throws Exception
path
- the path to the root directory or file to read fromException
public List<String> currentLabels()
LabelAwareSentenceIterator
currentLabels
in interface LabelAwareSentenceIterator
Copyright © 2016. All Rights Reserved.