Package cc.mallet.extract
Class RegexFieldCleaner
- java.lang.Object
-
- cc.mallet.extract.RegexFieldCleaner
-
- All Implemented Interfaces:
FieldCleaner
public class RegexFieldCleaner extends java.lang.Object implements FieldCleaner
A field cleaner that removes all occurrences of a given regex. Created: Nov 26, 2004- Version:
- $Id: RegexFieldCleaner.java,v 1.1 2007/10/22 21:37:44 mccallum Exp $
- Author:
-
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REMOVE_PUNCT
-
Constructor Summary
Constructors Constructor Description RegexFieldCleaner(java.lang.String regex)
RegexFieldCleaner(java.util.regex.Pattern regex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
cleanFieldValue(java.lang.String rawFieldValue)
Returns a post-processed version of a field.
-
-
-
-
Field Detail
-
REMOVE_PUNCT
public static final java.lang.String REMOVE_PUNCT
- See Also:
- Constant Field Values
-
-
Method Detail
-
cleanFieldValue
public java.lang.String cleanFieldValue(java.lang.String rawFieldValue)
Description copied from interface:FieldCleaner
Returns a post-processed version of a field.- Specified by:
cleanFieldValue
in interfaceFieldCleaner
- Returns:
- A processed string
-
-