cc.mallet.pipe
Class Directory2FileIterator

java.lang.Object
  extended by cc.mallet.pipe.Pipe
      extended by cc.mallet.pipe.Directory2FileIterator
All Implemented Interfaces:
AlphabetCarrying, java.io.Serializable

public class Directory2FileIterator
extends Pipe

Convert a File object representing a directory into a FileIterator which iterates over files in the directory matching a pattern and which extracts a label from each file path to become the target field of the instance.

Author:
Andrew McCallum mccallum@cs.umass.edu
See Also:
Serialized Form

Constructor Summary
Directory2FileIterator()
           
Directory2FileIterator(java.io.FileFilter fileFilter, java.util.regex.Pattern labelRegex)
           
Directory2FileIterator(java.util.regex.Pattern absolutePathRegex, java.util.regex.Pattern filenameRegex, java.util.regex.Pattern labelRegex)
           
Directory2FileIterator(java.lang.String filenameRegex)
           
 
Method Summary
 java.util.Iterator pipe(java.io.File directory)
           
 Instance pipe(Instance carrier)
          Really this should be 'protected', but isn't for historical reasons.
 java.util.Iterator pipe(java.lang.String directory)
           
 java.util.Iterator pipe(java.net.URI directory)
           
 
Methods inherited from class cc.mallet.pipe.Pipe
alphabetsMatch, getAlphabet, getAlphabets, getDataAlphabet, getInstanceId, getTargetAlphabet, instanceFrom, instancesFrom, instancesFrom, isDataAlphabetSet, isTargetProcessing, newIteratorFrom, preceedingPipeDataAlphabetNotification, preceedingPipeTargetAlphabetNotification, precondition, readResolve, setDataAlphabet, setOrCheckDataAlphabet, setOrCheckTargetAlphabet, setTargetAlphabet, setTargetProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Directory2FileIterator

public Directory2FileIterator(java.io.FileFilter fileFilter,
                              java.util.regex.Pattern labelRegex)

Directory2FileIterator

public Directory2FileIterator(java.util.regex.Pattern absolutePathRegex,
                              java.util.regex.Pattern filenameRegex,
                              java.util.regex.Pattern labelRegex)

Directory2FileIterator

public Directory2FileIterator(java.lang.String filenameRegex)

Directory2FileIterator

public Directory2FileIterator()
Method Detail

pipe

public Instance pipe(Instance carrier)
Description copied from class: Pipe
Really this should be 'protected', but isn't for historical reasons.

Overrides:
pipe in class Pipe

pipe

public java.util.Iterator pipe(java.io.File directory)

pipe

public java.util.Iterator pipe(java.net.URI directory)

pipe

public java.util.Iterator pipe(java.lang.String directory)