public class DefaultSimilarityHandler extends java.lang.Object implements SimilarityHandler
Modifier and Type | Field and Description |
---|---|
protected java.util.List<SimilarityHandler> |
_handlers
Description of the Field
|
Constructor and Description |
---|
DefaultSimilarityHandler()
Constructor for the DefaultSimilarityHandler object
|
Modifier and Type | Method and Description |
---|---|
void |
addHandler(SimilarityHandler sm)
Adds a feature to the Handler attribute of the DefaultSimilarityHandler
object
|
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
|
double |
getSimilarity(java.lang.Object one,
java.lang.Object two,
double maxDiff,
double maxSim)
Gets the similarity attribute of the DefaultSimilarityHandler object
|
boolean |
handles(java.lang.Object one,
java.lang.Object two)
can this handler compute a similarity for these two chunks
|
void |
removeHandler(SimilarityHandler sm)
Description of the Method
|
void |
setSimilarity(IChunk one,
IChunk two,
double sim)
Sets the similarity attribute of the DefaultSimilarityHandler class
|
protected java.util.List<SimilarityHandler> _handlers
public DefaultSimilarityHandler()
public void addHandler(SimilarityHandler sm)
sm
- The feature to be added to the Handler attributepublic void removeHandler(SimilarityHandler sm)
sm
- Description of the Parameterpublic double getSimilarity(java.lang.Object one, java.lang.Object two, double maxDiff, double maxSim)
one
- Description of the Parametertwo
- Description of the ParametermaxDiff
- Description of the ParametermaxSim
- Description of the Parameterpublic boolean handles(java.lang.Object one, java.lang.Object two)
handles
in interface SimilarityHandler
one
- Description of the Parametertwo
- Description of the Parameterpublic double computeSimilarity(java.lang.Object one, java.lang.Object two, double maxDiff, double maxSim)
computeSimilarity
in interface SimilarityHandler
one
- Description of the Parametertwo
- Description of the ParametermaxDiff
- Description of the ParametermaxSim
- Description of the Parameter