Class NysiisMeasure
- java.lang.Object
-
- org.aksw.limes.core.measures.measure.AMeasure
-
- org.aksw.limes.core.measures.measure.string.StringMeasure
-
- org.aksw.limes.core.measures.measure.phoneticmeasure.NysiisMeasure
-
- All Implemented Interfaces:
IMeasure,IStringMeasure
public class NysiisMeasure extends StringMeasure
-
-
Constructor Summary
Constructors Constructor Description NysiisMeasure()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancomputableViaOverlap()Returns true if this similarity function can be computed just via the getSimilarity(overlag, lengthA, lengthB)intgetAlpha(int xTokensNumber, int yTokensNumber, double threshold)Threshold for the positional filteringstatic StringgetCode(String string)intgetMidLength(int tokensNumber, double threshold)Theshold for the length of the tokens to be indexedStringgetName()Returns name of a measure.intgetPrefixLength(int tokensNumber, double threshold)Length of prefix to consider when mapping the input string with other strings.doublegetRuntimeApproximation(double mappingSize)Returns the runtime approximation of a measure.doublegetSimilarity(int overlap, int lengthA, int lengthB)Returns the similarity of two strings given their length and the overlap.doublegetSimilarity(Object object1, Object object2)Returns the similarity between two objects.doublegetSimilarity(Instance instance1, Instance instance2, String property1, String property2)Returns the similarity between two instances, given their corresponding properties.doublegetSizeFilteringThreshold(int tokensNumber, double threshold)StringgetType()Returns type of a measure.doubleproximity(String s1, String s2)
-
-
-
Method Detail
-
getPrefixLength
public int getPrefixLength(int tokensNumber, double threshold)Description copied from interface:IStringMeasureLength of prefix to consider when mapping the input string with other strings.- Parameters:
tokensNumber- Size of input string inthreshold- Similarity threshold- Returns:
- Prefix length
-
getMidLength
public int getMidLength(int tokensNumber, double threshold)Description copied from interface:IStringMeasureTheshold for the length of the tokens to be indexed- Parameters:
tokensNumber- Number of tokens of current inputthreshold- Similarity threshold- Returns:
- Length of tokens to be indexed
-
getSizeFilteringThreshold
public double getSizeFilteringThreshold(int tokensNumber, double threshold)
-
getAlpha
public int getAlpha(int xTokensNumber, int yTokensNumber, double threshold)Description copied from interface:IStringMeasureThreshold for the positional filtering- Parameters:
xTokensNumber- Size of the first input stringyTokensNumber- Size of the first input stringthreshold- Similarity threshold- Returns:
- Threshold for positional filtering
-
getSimilarity
public double getSimilarity(int overlap, int lengthA, int lengthB)Description copied from interface:IStringMeasureReturns the similarity of two strings given their length and the overlap. Useful when these values are known so that no computation of known values have to be carried out anew- Parameters:
overlap- Overlap of strings A and BlengthA- Length of AlengthB- Length of B- Returns:
- Similarity of A and B
-
computableViaOverlap
public boolean computableViaOverlap()
Description copied from interface:IStringMeasureReturns true if this similarity function can be computed just via the getSimilarity(overlag, lengthA, lengthB)- Returns:
- True if it's possible, else false;
-
getSimilarity
public double getSimilarity(Object object1, Object object2)
Description copied from interface:IMeasureReturns the similarity between two objects.- Parameters:
object1- , the source objectobject2- , the target object- Returns:
- The similarity of the objects
-
getType
public String getType()
Description copied from interface:IMeasureReturns type of a measure.- Returns:
- The runtime of the measure
-
getSimilarity
public double getSimilarity(Instance instance1, Instance instance2, String property1, String property2)
Description copied from interface:IMeasureReturns the similarity between two instances, given their corresponding properties.- Parameters:
instance1- , the source instanceinstance2- , the target instanceproperty1- , the source propertyproperty2- , the target property- Returns:
- The similarity of the instances
-
getName
public String getName()
Description copied from interface:IMeasureReturns name of a measure.- Returns:
- Measure name as a string
-
getRuntimeApproximation
public double getRuntimeApproximation(double mappingSize)
Description copied from interface:IMeasureReturns the runtime approximation of a measure.- Parameters:
mappingSize- , the mapping size returned by the measure- Returns:
- The runtime of the measure
-
-