edu.indiana.iucbrf.feature.differentiator
Class TextTermVectorPairFeatureDifferentiator

java.lang.Object
  extended by edu.indiana.iucbrf.feature.differentiator.AbstractFeatureDifferentiator
      extended by edu.indiana.iucbrf.feature.differentiator.TermVectorFeatureDifferentiator
          extended by edu.indiana.iucbrf.feature.differentiator.TextTermVectorPairFeatureDifferentiator
All Implemented Interfaces:
FeatureDifferentiator, Differentiator, java.io.Serializable

public class TextTermVectorPairFeatureDifferentiator
extends TermVectorFeatureDifferentiator

This feature differentiator assumes that the features contain TextTermVectorPair values. In calculating difference, if term vectors are present in both TextTermVectorPairs, a 1 - cosine similarity is returned. Otherwise the text is compared on an equal/not-equal basis.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.indiana.iucbrf.feature.differentiator.AbstractFeatureDifferentiator
normalizationValue
 
Constructor Summary
TextTermVectorPairFeatureDifferentiator()
          Creates a new instance of TextTermVectorPairFeatureDifferentiator
TextTermVectorPairFeatureDifferentiator(double normalizationValue)
           
 
Method Summary
protected  double calcDifferenceImpl(Feature f1, Feature f2)
           
 
Methods inherited from class edu.indiana.iucbrf.feature.differentiator.AbstractFeatureDifferentiator
calcDifference, calcDifference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextTermVectorPairFeatureDifferentiator

public TextTermVectorPairFeatureDifferentiator()
Creates a new instance of TextTermVectorPairFeatureDifferentiator


TextTermVectorPairFeatureDifferentiator

public TextTermVectorPairFeatureDifferentiator(double normalizationValue)
Method Detail

calcDifferenceImpl

protected double calcDifferenceImpl(Feature f1,
                                    Feature f2)
Overrides:
calcDifferenceImpl in class TermVectorFeatureDifferentiator