public class SymbolBasedSimilarity extends Object implements SimilarityMeasure<org.semanticweb.owlapi.model.OWLObject>
| Constructor and Description |
|---|
SymbolBasedSimilarity() |
| Modifier and Type | Method and Description |
|---|---|
double |
compare(org.semanticweb.owlapi.model.OWLObject anObject,
org.semanticweb.owlapi.model.OWLObject anotherObject)
Compares the two input objects.
|
protected double |
compareSymbols(Collection<? extends org.semanticweb.owlapi.model.OWLObject> anObjectSymbols,
Collection<? extends org.semanticweb.owlapi.model.OWLObject> anotherObjectSymbols)
Compares symbols computing the ratio of the size of their intersection
over the size of their union.
|
protected Set<org.semanticweb.owlapi.model.OWLObject> |
extractSymbols(org.semanticweb.owlapi.model.OWLObject anObject)
Extracts the relevant symbols for the comparison.
|
boolean |
isSymmetric() |
public double compare(org.semanticweb.owlapi.model.OWLObject anObject,
org.semanticweb.owlapi.model.OWLObject anotherObject)
SimilarityMeasureequals method available
for O. If isSymmetric returns true, then it must
hold that compare(A,B) == compare (B,A).compare in interface SimilarityMeasure<org.semanticweb.owlapi.model.OWLObject>anObject - the first object to compare. cannot be null.anotherObject - the first object to compare. cannot be null.protected double compareSymbols(Collection<? extends org.semanticweb.owlapi.model.OWLObject> anObjectSymbols, Collection<? extends org.semanticweb.owlapi.model.OWLObject> anotherObjectSymbols)
anObjectSymbols - First Collection of Symbols. Cannot be null.anotherObjectSymbols - Second Collection of Symbols. Cannot be null.NullPointerException - when either input is null.protected Set<org.semanticweb.owlapi.model.OWLObject> extractSymbols(org.semanticweb.owlapi.model.OWLObject anObject)
anObject - The OWLObject from which the symbols should be extracted.
Cannot be null.NullPointerException - when the input is null.public boolean isSymmetric()
isSymmetric in interface SimilarityMeasure<org.semanticweb.owlapi.model.OWLObject>true if compare(A,B) == compare (B,A)Copyright © 2015 The University of Manchester. All Rights Reserved.