|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fuberlin.wiwiss.semmf.engine.NumericMatcher
public class NumericMatcher
A class providing functionality for matching two semantically corresponding numerical values.
Field Summary | |
---|---|
static int |
DEC_SIM_DOWNWARDS
|
static int |
DEC_SIM_UPWARDS
|
static int |
DEC_SIM_WITH_DEVIATION
These constants should be used while instancing a new NumericMatcher. |
private int |
decreaseSim
Setting for a particular instance of StringMatcher |
private float |
maxDevFraction
For two numbers n1 nad n2, maxDevFraction is a fraction of n1 which indicates the maximum deviation from n1 beyond which the similarity between n1 and n2 eqals 0. |
Constructor Summary | |
---|---|
NumericMatcher(int decreaseSim,
float maxDevFraction)
Constructor. |
Method Summary | |
---|---|
private float |
calcNumSim(float n1,
float n2)
Calculates the simiarity of two given float numbers according to the settings of this NumericMatcher. |
float |
calcSim(com.hp.hpl.jena.rdf.model.RDFNode queryNode,
com.hp.hpl.jena.rdf.model.RDFNode resNode)
Calculates the numeric similarity between two RDFNodes, which are Literals holding float numbers. |
int |
getDecreaseSimParam()
|
float |
getMaxDevFraction()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEC_SIM_WITH_DEVIATION
public static final int DEC_SIM_UPWARDS
public static final int DEC_SIM_DOWNWARDS
private int decreaseSim
private float maxDevFraction
Constructor Detail |
---|
public NumericMatcher(int decreaseSim, float maxDevFraction)
decreaseSim
- indicates in which direction the
similarity of two different numbers should be decreased.maxDevFraction
- for two numbers to be matched n1 nad n2,
is a fraction of n1, which indicates the maximum
deviation from n1 beyond which the similarity between
n1 and n2 eqals 0.Method Detail |
---|
public float getMaxDevFraction()
public int getDecreaseSimParam()
private float calcNumSim(float n1, float n2)
n1
- number from the query graphn2
- number from the resource graphpublic float calcSim(com.hp.hpl.jena.rdf.model.RDFNode queryNode, com.hp.hpl.jena.rdf.model.RDFNode resNode)
calcSim
in interface Matcher
queryNode
- node from the query graphresNode
- node from the resource graph
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |