Package cc.mallet.pipe.iterator
Class LineGroupIterator
- java.lang.Object
-
- cc.mallet.pipe.iterator.LineGroupIterator
-
- All Implemented Interfaces:
java.util.Iterator<Instance>
public class LineGroupIterator extends java.lang.Object implements java.util.Iterator<Instance>
Iterate over groups of lines of text, separated by lines that match a regular expression. For example, the WSJ BaseNP data consists of sentences with one word per line, each sentence separated by a blank line. If the "boundary" line is to be included in the group, it is placed at the end of the group.
-
-
Constructor Summary
Constructors Constructor Description LineGroupIterator(java.io.Reader input, java.util.regex.Pattern lineBoundaryRegex, boolean skipBoundary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Instance
next()
java.lang.String
peekLineGroup()
void
remove()
-