|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fuberlin.wiwiss.semmf.engine.TaxonomicMatcher
public class TaxonomicMatcher
Object providing functionality for calculationg similarity between two given concepts based on their respective positions in an underlying hierarchy.
| Field Summary | |
|---|---|
private float[] |
milestones
Stores milestone values for all levels of this taxonomy. |
private boolean |
simInheritance
If set to true (default setting) then sim(queryConcept, resourceConcept = any Subclass of queryConcept) = 1. |
private Taxonomy |
taxonomy
Concept taxonomy based on which the similarity calculation is performed |
| Constructor Summary | |
|---|---|
TaxonomicMatcher(Taxonomy t,
MilestoneCalculator mc)
Constructor. |
|
| Method Summary | |
|---|---|
private float |
calcConSim(BottomConcept qc,
BottomConcept rc)
Calculates concept similarity between two given concepts based on their respective positions in the concept hierarchy. |
private float |
calcConSim(BottomConcept qc,
SuperConcept rc)
Calculates concept similarity between two given concepts based on their respective positions in the concept hierarchy. |
private static float |
calcConSim(float mC1,
float mC2,
float mCCP)
Calculates similarity of two concepts according the the formula: sim(c1,c2) = 1 - d(c1,c2), where d(c1,c2) = d(c1, ccp) + d(c2, ccp), and ccp = closest common parent of c1 and c2 |
private float |
calcConSim(java.lang.String qcURI,
java.lang.String rcURI)
Given URIs of two concepts the similarity between them is calculated based on their respective positions in the concept hierarchy. |
private float |
calcConSim(SuperConcept qc,
BottomConcept rc)
Calculates concept similarity between two given concepts based on their respective positions in the concept hierarchy. |
private float |
calcConSim(SuperConcept qc,
SuperConcept rc)
Calculates concept similarity between two given concepts based on their respective positions in the concept hierarchy. |
float |
calcSim(com.hp.hpl.jena.rdf.model.RDFNode n1,
com.hp.hpl.jena.rdf.model.RDFNode n2)
Calculates the concept similarity of two given RDFNodes from Jena2 framework based on their relative position in the concept hierarchy. |
private float |
getMilestone(int level)
|
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets matcher parameter which will influence the outcome of the simlarity value Currently suportet parameters (with corresponding values): - "simInheritance" (true | false) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Taxonomy taxonomy
private float[] milestones
private boolean simInheritance
| Constructor Detail |
|---|
public TaxonomicMatcher(Taxonomy t,
MilestoneCalculator mc)
t - based on which the matching will be performedmc - MilestoneCalculator object which determines
milestone values for all taxonomy levels| Method Detail |
|---|
public void setProperty(java.lang.String key,
java.lang.String value)
throws java.lang.IllegalArgumentException
key - name of the property to be setvalue - of the property to be set
java.lang.IllegalArgumentException - if either of the values is illegal
public float calcSim(com.hp.hpl.jena.rdf.model.RDFNode n1,
com.hp.hpl.jena.rdf.model.RDFNode n2)
calcSim in interface Matchern1 - node from the query graphn2 - node from the resource graph
private float calcConSim(java.lang.String qcURI,
java.lang.String rcURI)
qcURI - URI of the query conceptrcURI - URI of the resource concept
private float calcConSim(BottomConcept qc,
BottomConcept rc)
qc - concept from the query graphrc - concept from the resource graph
private float calcConSim(BottomConcept qc,
SuperConcept rc)
qc - concept from the query graphrc - concept from the resource graph
private float calcConSim(SuperConcept qc,
BottomConcept rc)
qc - concept from the query graphrc - concept from the resource graph
private float calcConSim(SuperConcept qc,
SuperConcept rc)
qc - concept from the query graphrc - concept from the resource graph
private static float calcConSim(float mC1,
float mC2,
float mCCP)
mC1 - milestone of concept 1mC2 - milestone of concept 2mCCP - milestone of the closest common parent of c1 and c2
private float getMilestone(int level)
level - hierarchy level
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||