public class BasicLineIterator extends java.lang.Object implements SentenceIterator, java.lang.Iterable<java.lang.String>
Constructor and Description |
---|
BasicLineIterator(java.io.File file) |
BasicLineIterator(java.io.InputStream stream) |
BasicLineIterator(java.lang.String filePath) |
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
void |
finish()
Allows for any finishing (closing of input streams or the like)
|
SentencePreProcessor |
getPreProcessor() |
boolean |
hasNext()
Same idea as
Iterator |
java.util.Iterator<java.lang.String> |
iterator()
Implentation for Iterable interface.
|
java.lang.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
|
void |
setPreProcessor(SentencePreProcessor preProcessor) |
public BasicLineIterator(@NonNull java.io.File file) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public BasicLineIterator(@NonNull java.io.InputStream stream)
public BasicLineIterator(@NonNull java.lang.String filePath) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public java.lang.String nextSentence()
SentenceIterator
nextSentence
in interface SentenceIterator
public boolean hasNext()
SentenceIterator
Iterator
hasNext
in interface SentenceIterator
public void reset()
SentenceIterator
reset
in interface SentenceIterator
public void finish()
SentenceIterator
finish
in interface SentenceIterator
public SentencePreProcessor getPreProcessor()
getPreProcessor
in interface SentenceIterator
public void setPreProcessor(SentencePreProcessor preProcessor)
setPreProcessor
in interface SentenceIterator
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>