Package cc.mallet.pipe
Class Directory2FileIterator
- java.lang.Object
-
- cc.mallet.pipe.Pipe
-
- 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
Constructors Constructor Description Directory2FileIterator()
Directory2FileIterator(java.io.FileFilter fileFilter, java.util.regex.Pattern labelRegex)
Directory2FileIterator(java.lang.String filenameRegex)
Directory2FileIterator(java.util.regex.Pattern absolutePathRegex, java.util.regex.Pattern filenameRegex, java.util.regex.Pattern labelRegex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instance
pipe(Instance carrier)
Really this should be 'protected', but isn't for historical reasons.java.util.Iterator
pipe(java.io.File directory)
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
-
-
-
-
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.
-
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)
-
-