public class UimaSentenceIterator extends BaseSentenceIterator
Modifier and Type | Field and Description |
---|---|
protected String |
path |
protected org.apache.uima.collection.CollectionReader |
reader |
protected Iterator<String> |
sentences |
preProcessor
Constructor and Description |
---|
UimaSentenceIterator(SentencePreProcessor preProcessor,
String path,
UimaResource resource) |
UimaSentenceIterator(String path,
UimaResource resource) |
Modifier and Type | Method and Description |
---|---|
static SentenceIterator |
createWithPath(String path)
Creates a uima sentence iterator with the given path
|
UimaResource |
getResource() |
boolean |
hasNext()
Same idea as
Iterator |
String |
nextSentence()
Gets the next sentence or null
if there's nothing left (Do yourself a favor and
check hasNext() )
|
void |
reset()
Resets the iterator to the beginning
|
static org.apache.uima.analysis_engine.AnalysisEngine |
segmenter()
Return a a sentence segmenter
|
finish, getPreProcessor, setPreProcessor
protected volatile org.apache.uima.collection.CollectionReader reader
protected String path
public UimaSentenceIterator(SentencePreProcessor preProcessor, String path, UimaResource resource)
public UimaSentenceIterator(String path, UimaResource resource)
public String nextSentence()
SentenceIterator
public UimaResource getResource()
public static SentenceIterator createWithPath(String path) throws Exception
path
- the path to the root directory or file to read fromException
public boolean hasNext()
SentenceIterator
Iterator
public void reset()
SentenceIterator
public static org.apache.uima.analysis_engine.AnalysisEngine segmenter()
Copyright © 2014. All rights reserved.