Documentation of 'cc.mallet.pipe.iterator.LineGroupIterator' Java class
LineGroupIterator
cc.mallet.pipe.iterator

Class 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 and 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 and Description
      boolean hasNext() 
      Instance next() 
      java.lang.String peekLineGroup() 
      void remove() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • LineGroupIterator

        public LineGroupIterator(java.io.Reader input,
                                 java.util.regex.Pattern lineBoundaryRegex,
                                 boolean skipBoundary)
    • Method Detail

      • peekLineGroup

        public java.lang.String peekLineGroup()
      • next

        public Instance next()
        Specified by:
        next in interface java.util.Iterator<Instance>
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<Instance>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<Instance>

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.