public class CosineMeasure extends StringMeasure
| Constructor and Description |
|---|
CosineMeasure() |
| 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
|
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.
|
double |
getSimilarityChar(Object a,
Object b) |
double |
getSizeFilteringThreshold(int tokensNumber,
double threshold) |
String |
getType()
Returns type of a measure.
|
public 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 getSimilarity(int overlap,
int lengthA,
int lengthB)
IStringMeasureoverlap - Overlap of strings A and BlengthA - Length of AlengthB - Length of Bpublic boolean computableViaOverlap()
IStringMeasurepublic 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)
xTokensNumber - Size of the first input stringyTokensNumber - Size of the first input stringthreshold - Similarity thresholdpublic double getRuntimeApproximation(double mappingSize)
IMeasureCopyright © 2018. All rights reserved.