|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fuberlin.wiwiss.semmf.engine.StringMatcher
public class StringMatcher
A class providing functionality for matching two semantically corresponding String values.
Field Summary | |
---|---|
static boolean |
CASE_SENSITIVE
These constants should be used while instancing a new StringMatcher |
private boolean |
caseSensitive
Setting for a particular instance of StringMatcher |
static boolean |
IGNORE_CASE
|
Constructor Summary | |
---|---|
StringMatcher()
Constructor with default setting = ignore case |
|
StringMatcher(boolean caseSensitive)
Constructor. |
Method Summary | |
---|---|
float |
calcSim(com.hp.hpl.jena.rdf.model.RDFNode n1,
com.hp.hpl.jena.rdf.model.RDFNode n2)
Calculates the similarity of two given RDFNodes from Jena2 framework. |
private float |
calcStringSim(java.lang.String s1,
java.lang.String s2)
Calculates the similarity of two given strings according to the setting (case (in)sensitive) of this StringMatcher. |
boolean |
isCaseSensitive()
Returns true if the matcher performs case sensitive matching |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean CASE_SENSITIVE
public static final boolean IGNORE_CASE
private boolean caseSensitive
Constructor Detail |
---|
public StringMatcher()
public StringMatcher(boolean caseSensitive)
caseSensitive
- indicates if the matching should be case sensitive or not.Method Detail |
---|
private float calcStringSim(java.lang.String s1, java.lang.String s2)
s1
- string serialization of the node from the query graphs2
- string serialization of the node from the resource graph
public boolean isCaseSensitive()
public float calcSim(com.hp.hpl.jena.rdf.model.RDFNode n1, com.hp.hpl.jena.rdf.model.RDFNode n2)
calcSim
in interface Matcher
n1
- node from the query graphn2
- node from the resource graph
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |