it.unitn.disi.smatch.matchers.element.string
Class EditDistance

java.lang.Object
  extended by it.unitn.disi.smatch.components.Configurable
      extended by it.unitn.disi.smatch.matchers.element.string.EditDistance
All Implemented Interfaces:
IConfigurable, IStringBasedElementLevelSemanticMatcher

public class EditDistance
extends Configurable
implements IStringBasedElementLevelSemanticMatcher

Implements Edit Distance matcher. See Element Level Semantic matchers paper for more details.

Accepts the following parameters:

threshold - float parameter, which by default equals 0.9.

Author:
Mikalai Yatskevich mikalai.yatskevich@comlab.ox.ac.uk,

Field Summary
 
Fields inherited from class it.unitn.disi.smatch.components.Configurable
GLOBAL_PREFIX, globalComponents, properties
 
Constructor Summary
EditDistance()
           
 
Method Summary
 char match(java.lang.String str1, java.lang.String str2)
          Computes the relation with edit distance matcher.
 boolean setProperties(java.util.Properties newProperties)
          Sets component configuration properties.
 
Methods inherited from class it.unitn.disi.smatch.components.Configurable
configureComponent, getComponentProperties, getProperties, loadProperties, makeComponentPrefix, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.unitn.disi.smatch.components.IConfigurable
getProperties, setProperties
 

Constructor Detail

EditDistance

public EditDistance()
Method Detail

setProperties

public boolean setProperties(java.util.Properties newProperties)
                      throws ConfigurableException
Description copied from interface: IConfigurable
Sets component configuration properties. The component might check for properties change and reconfigure or reload subcomponents.

Specified by:
setProperties in interface IConfigurable
Overrides:
setProperties in class Configurable
Parameters:
newProperties - a new configuration
Returns:
true if properties have been changed
Throws:
ConfigurableException - ConfigurableException

match

public char match(java.lang.String str1,
                  java.lang.String str2)
Computes the relation with edit distance matcher.

Specified by:
match in interface IStringBasedElementLevelSemanticMatcher
Parameters:
str1 - one input string
str2 - another input string
Returns:
synonym or IDK relation


© 2010-2011 Knowdive @ DISI