|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
de.dfki.mycbr.core.similarity.StringFct
public class StringFct
Calculates the similarity of two strings for a given description. At the moment only syntactic equality is supported.
| Constructor Summary | |
|---|---|
StringFct(Project prj,
StringConfig config,
StringDesc desc,
java.lang.String name)
Initializes this with the given description. |
|
| Method Summary | |
|---|---|
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 |
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 |
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)
|
| Methods inherited from class java.util.Observable |
|---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringFct(Project prj,
StringConfig config,
StringDesc desc,
java.lang.String name)
desc - the description of the| Method Detail |
|---|
public Similarity calculateSimilarity(Attribute value1,
Attribute value2)
throws java.lang.Exception
calculateSimilarity in interface ISimFctvalue1 - the first valuevalue2 - the second value
java.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()
ISimFct
getName in interface ISimFctpublic void setName(java.lang.String name)
ISimFct
setName in interface ISimFctname - the new name of this functionpublic AttributeDesc getDesc()
ISimFct
getDesc in interface ISimFctpublic Project getProject()
getProject in interface ISimFctpublic MultipleConfig getMultipleConfig()
getMultipleConfig in interface ISimFctpublic void setMultipleConfig(MultipleConfig mc)
setMultipleConfig in interface ISimFct
public void clone(AttributeDesc descNEW,
boolean active)
ISimFct
clone in interface ISimFct
public void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||