public class UkWaCDocumentIterator extends Object implements Iterator<LabeledDocument>
| Constructor and Description |
|---|
UkWaCDocumentIterator(File documentsFile)
Creates an
Iterator over the file where each document returned
is labeled by the source from which it was extracted |
UkWaCDocumentIterator(String documentsFile)
Creates an
Iterator over the file where each document returned
is labeled by the source from which it was extracted |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns
true if there are more documents to return. |
LabeledDocument |
next()
Returns the next document from the file.
|
void |
remove()
Throws an
UnsupportedOperationException if called. |
public UkWaCDocumentIterator(File documentsFile) throws IOException
Iterator over the file where each document returned
is labeled by the source from which it was extracteddocumentsFile - the UkWaC fileIOException - if any error occurs when reading
documentsFilepublic UkWaCDocumentIterator(String documentsFile) throws IOException
Iterator over the file where each document returned
is labeled by the source from which it was extracteddocumentsFile - the name of the UkWaC fileIOException - if any error occurs when reading
documentsFilepublic boolean hasNext()
true if there are more documents to return.hasNext in interface Iterator<LabeledDocument>public LabeledDocument next()
next in interface Iterator<LabeledDocument>public void remove()
UnsupportedOperationException if called.remove in interface Iterator<LabeledDocument>Copyright © 2012. All Rights Reserved.