cc.mallet.extract
Class RegexFieldCleaner

java.lang.Object
  extended by 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
static java.lang.String REMOVE_PUNCT
           
 
Constructor Summary
RegexFieldCleaner(java.util.regex.Pattern regex)
           
RegexFieldCleaner(java.lang.String regex)
           
 
Method Summary
 java.lang.String cleanFieldValue(java.lang.String rawFieldValue)
          Returns a post-processed version of a field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REMOVE_PUNCT

public static final java.lang.String REMOVE_PUNCT
See Also:
Constant Field Values
Constructor Detail

RegexFieldCleaner

public RegexFieldCleaner(java.lang.String regex)

RegexFieldCleaner

public RegexFieldCleaner(java.util.regex.Pattern regex)
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 interface FieldCleaner
Returns:
A processed string