public class WaCkypediaDocumentIterator extends Object implements Iterator<Document>
Document containg a single
dependency parsed sentence given a file in the CoNLL Format which
is contained in the XML format provided in the WaCkypedia corpus.
This class is thread-safe.
| Constructor and Description |
|---|
WaCkypediaDocumentIterator(String documentsFile)
Creates an
Iterator over the file where each document returned
contains the sequence of dependency parsed words composing a sentence.. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns
true if there are more documents to return. |
Document |
next()
Returns the next document from the file.
|
void |
remove()
Throws an
UnsupportedOperationException if called. |
public WaCkypediaDocumentIterator(String documentsFile)
Iterator over the file where each document returned
contains the sequence of dependency parsed words composing a sentence..documentsFile - the file specifying a dependency parsed file in the
CoNLL Format
separated by XML tags for the sentences and articles from which they cameIOError - if any error occurs when reading documentsFilepublic boolean hasNext()
true if there are more documents to return.public Document next()
public void remove()
UnsupportedOperationException if called.Copyright © 2012. All Rights Reserved.