org.jactr.core.utils.similarity
Interface SimilarityHandler

All Known Implementing Classes:
AutoSimilarityHandler, DefaultSimilarityHandler

public interface SimilarityHandler

code for computing the similarity between two chunks.. They should implement a caching mechanism so that hard coded similarities will nto be overwritten.

Author:
harrison

Method Summary
 double computeSimilarity(java.lang.Object one, java.lang.Object two, double maxDiff, double maxSim)
          compute the similarty between one and two scaled to fit maxDiff and maxSim
 boolean handles(java.lang.Object one, java.lang.Object two)
          can this handler compute a similarity for these two chunks
 

Method Detail

handles

boolean handles(java.lang.Object one,
                java.lang.Object two)
can this handler compute a similarity for these two chunks

Parameters:
one - Description of the Parameter
two - Description of the Parameter
Returns:
true if it can compute the sim

computeSimilarity

double computeSimilarity(java.lang.Object one,
                         java.lang.Object two,
                         double maxDiff,
                         double maxSim)
compute the similarty between one and two scaled to fit maxDiff and maxSim

Parameters:
one - Description of the Parameter
two - Description of the Parameter
maxDiff - Description of the Parameter
maxSim - Description of the Parameter
Returns:
Description of the Return Value