public class JaroMeasure extends StringMeasure
| Constructor and Description |
|---|
JaroMeasure() |
| Modifier and Type | Method and Description |
|---|---|
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
|
static List<Character> |
getCommonCharacters(String string1,
String string2,
int distanceSep)
returns a string buffer of characters from string1 within string2 if they
are of a given distance seperation from the position in string1.
|
int |
getMidLength(int tokensNumber,
double threshold)
Theshold for the length of the tokens to be indexed
|
String |
getName()
Returns name of a measure.
|
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.
|
float |
getSimilarity(String string1,
String string2)
gets the similarity of the two strings using Jaro distance.
|
double |
getSizeFilteringThreshold(int tokensNumber,
double threshold) |
static int |
getTranspositions(List<Character> source,
List<Character> target) |
String |
getType()
Returns type of a measure.
|
public static int getTranspositions(List<Character> source, List<Character> target)
public static List<Character> getCommonCharacters(String string1, String string2, int distanceSep)
string1 - Stringstring2 - StringdistanceSep - distance separatorpublic float getSimilarity(String string1, String string2)
string1 - the first input stringstring2 - the second input stringpublic double getSimilarity(Object object1, Object object2)
IMeasurepublic String getType()
IMeasurepublic double getSimilarity(Instance instance1, Instance instance2, String property1, String property2)
IMeasurepublic String getName()
IMeasurepublic double getRuntimeApproximation(double mappingSize)
IMeasurepublic int getPrefixLength(int tokensNumber,
double threshold)
IStringMeasuretokensNumber - Size of input string inthreshold - Similarity thresholdpublic int getMidLength(int tokensNumber,
double threshold)
IStringMeasuretokensNumber - Number of tokens of current inputthreshold - Similarity thresholdpublic double getSizeFilteringThreshold(int tokensNumber,
double threshold)
public int getAlpha(int xTokensNumber,
int yTokensNumber,
double threshold)
IStringMeasurexTokensNumber - Size of the first input stringyTokensNumber - Size of the first input stringthreshold - Similarity thresholdpublic double getSimilarity(int overlap,
int lengthA,
int lengthB)
IStringMeasureoverlap - Overlap of strings A and BlengthA - Length of AlengthB - Length of Bpublic boolean computableViaOverlap()
IStringMeasureCopyright © 2020. All rights reserved.