edu.umass.cs.mallet.projects.seg_plus_coref.coreference
Class SplitFieldStringDistancePipe

java.lang.Object
  extended byedu.umass.cs.mallet.base.pipe.Pipe
      extended byedu.umass.cs.mallet.projects.seg_plus_coref.coreference.SplitFieldStringDistancePipe
All Implemented Interfaces:
java.io.Serializable

public class SplitFieldStringDistancePipe
extends Pipe

Uses a StringDistance on two perversions of the original strings. (1) split the strings into two sections, based on the delimiter given by "splitPattern". Calculate separate edit distances for each. (2) If one string is longer than the other, truncate the longer one from the end, and then from the beginning, and calculate the edit distances on the two resulting strings

See Also:
Serialized Form

Constructor Summary
SplitFieldStringDistancePipe(com.wcohen.secondstring.StringDistance distanceMeasure, java.lang.String[] fields, java.lang.String featureName)
           
SplitFieldStringDistancePipe(com.wcohen.secondstring.StringDistance distanceMeasure, java.lang.String[] fields, java.lang.String featureName, java.lang.String splitPattern)
           
 
Method Summary
 Instance pipe(Instance carrier)
          Process an Instance.
 
Methods inherited from class edu.umass.cs.mallet.base.pipe.Pipe
getDataAlphabet, getInstanceId, getParent, getParentRoot, getTargetAlphabet, isDataAlphabetSet, isTargetProcessing, pipe, readResolve, resolveDataAlphabet, resolveTargetAlphabet, setDataAlphabet, setParent, setTargetAlphabet, setTargetProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitFieldStringDistancePipe

public SplitFieldStringDistancePipe(com.wcohen.secondstring.StringDistance distanceMeasure,
                                    java.lang.String[] fields,
                                    java.lang.String featureName)

SplitFieldStringDistancePipe

public SplitFieldStringDistancePipe(com.wcohen.secondstring.StringDistance distanceMeasure,
                                    java.lang.String[] fields,
                                    java.lang.String featureName,
                                    java.lang.String splitPattern)
Method Detail

pipe

public Instance pipe(Instance carrier)
Description copied from class: Pipe
Process an Instance. This method takes an input Instance, destructively modifies it in some way, and returns it. This is the method by which all pipes are eventually run.

One can create a new concrete subclass of Pipe simply by implementing this method.

Specified by:
pipe in class Pipe
Parameters:
carrier - Instance to be processed.