|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jactr.core.utils.similarity.AutoSimilarityHandler
public class AutoSimilarityHandler
AutoSimilarityHandler that computes the similarity between any two chunks based on average of the similarities between their slot values. This is similar, if not identical to Raluca's proposal. 0. if they are the same, return maxsim 1. if the sim between two chunks is already defined, return it 2. if they are of the same chunk type, or derivable chunk types - compare the slot values based on the smaller of the two chunks 3. if they are not related chunk types - return maxDiff 4. if they are both numbers - return the diff scaled by maxDiff/maxSim 5. if they are strings.. well, screw them
| Constructor Summary | |
|---|---|
AutoSimilarityHandler()
Constructor for the AutoSimilarityHandler object |
|
AutoSimilarityHandler(int depth)
Constructor for the AutoSimilarityHandler object |
|
| Method Summary | |
|---|---|
double |
computeSimilarity(java.lang.Object one,
java.lang.Object two,
double maxDiff,
double maxSim)
Description of the Method |
boolean |
handles(java.lang.Object one,
java.lang.Object two)
Description of the Method |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AutoSimilarityHandler()
public AutoSimilarityHandler(int depth)
depth - Description of the Parameter| Method Detail |
|---|
public boolean handles(java.lang.Object one,
java.lang.Object two)
handles in interface SimilarityHandlerone - Description of the Parametertwo - Description of the Parameter
public double computeSimilarity(java.lang.Object one,
java.lang.Object two,
double maxDiff,
double maxSim)
computeSimilarity in interface SimilarityHandlerone - Description of the Parametertwo - Description of the ParametermaxDiff - Description of the ParametermaxSim - Description of the Parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||