Package cc.mallet.pipe
Class TokenSequenceRemoveStopPatterns
- java.lang.Object
-
- cc.mallet.pipe.Pipe
-
- cc.mallet.pipe.TokenSequenceRemoveStopPatterns
-
- All Implemented Interfaces:
AlphabetCarrying
,java.io.Serializable
public class TokenSequenceRemoveStopPatterns extends Pipe implements java.io.Serializable
Remove tokens from the token sequence in the data field whose text matches any of a set of regular expressions.- Author:
- David Mimno
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TokenSequenceRemoveStopPatterns()
TokenSequenceRemoveStopPatterns(java.io.File patternFile)
Load a stop patterns from a file.TokenSequenceRemoveStopPatterns(java.lang.String[] patterns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenSequenceRemoveStopPatterns
addPatterns(java.io.File patternFile)
TokenSequenceRemoveStopPatterns
addPatterns(java.lang.String[] patterns)
Instance
pipe(Instance carrier)
Really this should be 'protected', but isn't for historical reasons.-
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
-
TokenSequenceRemoveStopPatterns
public TokenSequenceRemoveStopPatterns()
-
TokenSequenceRemoveStopPatterns
public TokenSequenceRemoveStopPatterns(java.io.File patternFile)
Load a stop patterns from a file.- Parameters:
stoplistFile
- The file to load
-
TokenSequenceRemoveStopPatterns
public TokenSequenceRemoveStopPatterns(java.lang.String[] patterns)
- Parameters:
patterns
- An array of strings representing patterns
-
-
Method Detail
-
addPatterns
public TokenSequenceRemoveStopPatterns addPatterns(java.lang.String[] patterns)
-
addPatterns
public TokenSequenceRemoveStopPatterns addPatterns(java.io.File patternFile)
-
-