| Constructor and Description |
|---|
StringFct(Project prj,
StringConfig config,
StringDesc desc,
java.lang.String name)
Initializes this with the given description.
|
| Modifier and Type | Method and Description |
|---|---|
Similarity |
calculateSimilarity(Attribute value1,
Attribute value2)
Calculates the similarity of the given attributes.
|
void |
clone(AttributeDesc descNEW,
boolean active)
Creates a new function which is the same function
as this but with a different description, namely descNEW.
|
StringConfig |
getConfig()
Returns the configuration of this function.
|
AttributeDesc |
getDesc()
Returns the description of the attributes which can be compared
using this function
|
int |
getLevenshteinAddCost() |
int |
getLevenshteinChangeCost() |
int |
getLevenshteinDelCost() |
MultipleConfig |
getMultipleConfig() |
int |
getN()
Returns the parameter n for computing NGRAM similarity.
|
java.lang.String |
getName()
Returns the name of this function
|
Project |
getProject() |
boolean |
isCaseSensitive()
Returns whether this function is case sensitive.
|
boolean |
isSymmetric()
Returns whether this function is symmetric.
|
void |
setCaseSensitive(boolean caseSensitive)
Specifies whether this function is case sensitive.
|
void |
setLevenshteinAddCost(int levenshteinAddCost) |
void |
setLevenshteinChangeCost(int levenshteinChangeCost) |
void |
setLevenshteinDelCost(int levenshteinDelCost) |
void |
setMultipleConfig(MultipleConfig mc) |
void |
setN(int n)
Sets the parameter n for computing NGRAM similarity.
|
void |
setName(java.lang.String name)
Sets the name of this function to name
|
void |
setSymmetric(boolean symmetric)
Specifies whether this function is symmetric or not.
|
void |
update(java.util.Observable o,
java.lang.Object arg) |
public StringFct(Project prj, StringConfig config, StringDesc desc, java.lang.String name)
desc - the description of thepublic int getLevenshteinDelCost()
public void setLevenshteinDelCost(int levenshteinDelCost)
levenshteinDelCost - the levenshteinDelCost to setpublic int getLevenshteinAddCost()
public void setLevenshteinAddCost(int levenshteinAddCost)
levenshteinAddCost - the levenshteinAddCost to setpublic int getLevenshteinChangeCost()
public void setLevenshteinChangeCost(int levenshteinChangeCost)
levenshteinChangeCost - the levenshteinChangeCost to setpublic Similarity calculateSimilarity(Attribute value1, Attribute value2) throws java.lang.Exception
calculateSimilarity in interface ISimFctvalue1 - the first valuevalue2 - the second valuejava.lang.Exceptionpublic boolean isSymmetric()
isSymmetric in interface ISimFctpublic void setSymmetric(boolean symmetric)
ISimFctsim is symmetric, sim(q,c) = sim(c,q)
should hold for all queries q and cases c this function is defined on.
Else the function is asymmetric.setSymmetric in interface ISimFctsymmetric - specifies whether this function is symmetric or not.public StringConfig getConfig()
public int getN()
public void setN(int n)
n - the new parameter npublic boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
caseSensitive - true, if function is case sensitive, false otherwisepublic java.lang.String getName()
ISimFctpublic void setName(java.lang.String name)
ISimFctpublic AttributeDesc getDesc()
ISimFctpublic Project getProject()
getProject in interface ISimFctpublic MultipleConfig getMultipleConfig()
getMultipleConfig in interface ISimFctpublic void setMultipleConfig(MultipleConfig mc)
setMultipleConfig in interface ISimFctpublic void clone(AttributeDesc descNEW, boolean active)
ISimFctpublic void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observer