
it.unitn.disi.smatch.matchers.element.string.Synonym Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of s-match Show documentation
Show all versions of s-match Show documentation
A version of S-Match semantic matching framework for Open Data
The newest version!
package it.unitn.disi.smatch.matchers.element.string;
import it.unitn.disi.common.components.Configurable;
import it.unitn.disi.smatch.data.mappings.IMappingElement;
import it.unitn.disi.smatch.matchers.element.IStringBasedElementLevelSemanticMatcher;
/**
* Implements Synonym matcher.
* See Element Level Semantic matchers paper for more details.
*
* @author Mikalai Yatskevich [email protected]
* @author Aliaksandr Autayeu
*/
public class Synonym extends Configurable implements IStringBasedElementLevelSemanticMatcher {
/**
* Computes relation with synonym matcher
*
* @param str1 the source string
* @param str2 the target string
* @return synonym or IDK relation
*/
public char match(String str1, String str2) {
if (str1 == null || str2 == null)
return IMappingElement.IDK;
if (str1.equals(str2)) {
return IMappingElement.EQUIVALENCE;
} else
return IMappingElement.IDK;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy