public class RatcliffObershelpMeasure extends StringMeasure implements ITrieFilterableStringMeasure
| Constructor and Description |
|---|
RatcliffObershelpMeasure() |
| Modifier and Type | Method and Description |
|---|---|
double |
characterFrequencyUpperBound(int l1,
int l2,
int m) |
int |
characterMatchLowerBound(int l1,
int l2,
double threshold) |
boolean |
computableViaOverlap()
Returns true if this similarity function can be computed just via the
getSimilarity(overlag, lengthA, lengthB)
|
int |
getAlpha(int xTokensNumber,
int yTokensNumber,
double threshold)
Threshold for the positional filtering
|
int |
getMidLength(int tokensNumber,
double threshold)
Theshold for the length of the tokens to be indexed
|
String |
getName()
Returns name of a measure.
|
LinkedList<org.apache.commons.lang3.tuple.ImmutableTriple<Integer,Integer,Integer>> |
getPartitionBounds(int maxSize,
double threshold) |
int |
getPrefixLength(int tokensNumber,
double threshold)
Length of prefix to consider when mapping the input string with other
strings.
|
double |
getRuntimeApproximation(double mappingSize)
Returns the runtime approximation of a measure.
|
double |
getSimilarity(Instance instance1,
Instance instance2,
String property1,
String property2)
Returns the similarity between two instances, given their corresponding
properties.
|
double |
getSimilarity(int overlap,
int lengthA,
int lengthB)
Returns the similarity of two strings given their length and the overlap.
|
double |
getSimilarity(Object object1,
Object object2)
Returns the similarity between two objects.
|
double |
getSizeFilteringThreshold(int tokensNumber,
double threshold) |
String |
getType()
Returns type of a measure.
|
int |
lengthLowerBound(int l1,
double threshold) |
int |
lengthUpperBound(int l1,
double threshold) |
double |
proximity(String s1,
String s2)
returns the score calculated by the algorithm
|
public double characterFrequencyUpperBound(int l1,
int l2,
int m)
characterFrequencyUpperBound in interface ITrieFilterableStringMeasurepublic int characterMatchLowerBound(int l1,
int l2,
double threshold)
characterMatchLowerBound in interface ITrieFilterableStringMeasurepublic int lengthLowerBound(int l1,
double threshold)
lengthLowerBound in interface ITrieFilterableStringMeasurepublic int lengthUpperBound(int l1,
double threshold)
lengthUpperBound in interface ITrieFilterableStringMeasurepublic LinkedList<org.apache.commons.lang3.tuple.ImmutableTriple<Integer,Integer,Integer>> getPartitionBounds(int maxSize, double threshold)
getPartitionBounds in interface ITrieFilterableStringMeasurepublic double proximity(String s1, String s2)
proximity in interface ITrieFilterableStringMeasures1 - Strings2 - Stringpublic int getPrefixLength(int tokensNumber,
double threshold)
IStringMeasuregetPrefixLength in interface IStringMeasuretokensNumber - Size of input string inthreshold - Similarity thresholdpublic int getMidLength(int tokensNumber,
double threshold)
IStringMeasuregetMidLength in interface IStringMeasuretokensNumber - Number of tokens of current inputthreshold - Similarity thresholdpublic double getSizeFilteringThreshold(int tokensNumber,
double threshold)
getSizeFilteringThreshold in interface IStringMeasurepublic int getAlpha(int xTokensNumber,
int yTokensNumber,
double threshold)
IStringMeasuregetAlpha in interface IStringMeasurexTokensNumber - Size of the first input stringyTokensNumber - Size of the first input stringthreshold - Similarity thresholdpublic double getSimilarity(int overlap,
int lengthA,
int lengthB)
IStringMeasuregetSimilarity in interface IStringMeasureoverlap - Overlap of strings A and BlengthA - Length of AlengthB - Length of Bpublic boolean computableViaOverlap()
IStringMeasurecomputableViaOverlap in interface IStringMeasurepublic double getSimilarity(Object object1, Object object2)
IMeasuregetSimilarity in interface IMeasurepublic String getType()
IMeasurepublic double getSimilarity(Instance instance1, Instance instance2, String property1, String property2)
IMeasuregetSimilarity in interface IMeasurepublic String getName()
IMeasurepublic double getRuntimeApproximation(double mappingSize)
IMeasuregetRuntimeApproximation in interface IMeasureCopyright © 2020. All rights reserved.