edu.udo.cs.miningmart.schemamatching
Class NgramMatcher

java.lang.Object
  extended byedu.udo.cs.miningmart.schemamatching.MmSchemaMatcher
      extended byedu.udo.cs.miningmart.schemamatching.StringBasedSchemaMatcher
          extended byedu.udo.cs.miningmart.schemamatching.NgramMatcher

public class NgramMatcher
extends StringBasedSchemaMatcher

A simple matcher based on a comparison of all possible pairs of n-grams of two strings. The value of n is set in the constructor.

Version:
$Id: NgramMatcher.java,v 1.4 2006/04/11 14:10:17 euler Exp $
Author:
Timm Euler

Constructor Summary
NgramMatcher(int n)
          Constructor.
 
Method Summary
 double getStringSimilarity(java.lang.String str1, java.lang.String str2)
          Returns the double value that this matcher considers as the similarity between the two given Strings.
 
Methods inherited from class edu.udo.cs.miningmart.schemamatching.StringBasedSchemaMatcher
getDirectSimilarity, getDirectSimilarity, getSimilarityInvolvingConcepts
 
Methods inherited from class edu.udo.cs.miningmart.schemamatching.MmSchemaMatcher
getSimilarity, getSimilarityMatrix, getThresholdForComparingAttributes, getThresholdForComparingConcepts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NgramMatcher

public NgramMatcher(int n)
Constructor. Allows to set the length of an n-gram.

Parameters:
n - the length of an n-gram
Method Detail

getStringSimilarity

public double getStringSimilarity(java.lang.String str1,
                                  java.lang.String str2)
                           throws SchemaMatchException
Description copied from class: StringBasedSchemaMatcher
Returns the double value that this matcher considers as the similarity between the two given Strings.

Specified by:
getStringSimilarity in class StringBasedSchemaMatcher
Parameters:
str1 - One String
str2 - Another String
Returns:
a similarity value
Throws:
SchemaMatchException
See Also:
StringBasedSchemaMatcher.getStringSimilarity(String, String)


Copyright © 2001-2005