public class SimEngine extends Object
Similarity
).
It wraps an OWLGraphWrapper object, and also provides
convenience methods for calculating the LCAModifier and Type | Class and Description |
---|---|
class |
SimEngine.SimilarityAlgorithmException |
Modifier and Type | Field and Description |
---|---|
org.semanticweb.owlapi.model.OWLClass |
comparisonClass |
org.semanticweb.owlapi.model.OWLObjectProperty |
comparisonProperty |
org.semanticweb.owlapi.model.OWLObject |
comparisonSuperclass |
boolean |
excludeClassesInComparison |
protected OWLGraphWrapper |
graph |
Double |
minimumIC |
Constructor and Description |
---|
SimEngine(OWLGraphWrapper wrapper) |
Modifier and Type | Method and Description |
---|---|
Set<Similarity> |
calculateAllSimilarity(org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b)
iterates through ALL similarity metrics and calculates
|
Similarity |
calculateSimilarity(Similarity m,
org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b)
Calculates the similarity between two OWLObjects
this is the core method of the SimEngine
|
void |
calculateSimilarityAllByAll(String similarityAlgorithmName,
Double minScore) |
Double |
calculateSimilarityScore(Similarity m,
org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b) |
org.semanticweb.owlapi.model.OWLObject |
createUnionExpression(org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b,
org.semanticweb.owlapi.model.OWLObject c) |
org.semanticweb.owlapi.model.OWLClassExpression |
edgeSetToExpression(Set<OWLGraphEdge> edges) |
Set<OWLGraphEdge> |
extendEdge(OWLGraphEdge e) |
void |
filterObjects(Set<org.semanticweb.owlapi.model.OWLObject> objs) |
Class[] |
getAllSimilarityAlgorithmClasses() |
Set<org.semanticweb.owlapi.model.OWLObject> |
getAttributeClosureFor(org.semanticweb.owlapi.model.OWLObject x) |
Set<org.semanticweb.owlapi.model.OWLObject> |
getAttributesFor(org.semanticweb.owlapi.model.OWLObject x) |
Set<org.semanticweb.owlapi.model.OWLObject> |
getCommonSubsumers(org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b)
todo rename - actually gets common named ancestors
|
int |
getCommonSubsumersSize(org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b) |
int |
getCorpusSize() |
Set<String> |
getExcludedLabels()
any class whose label matches any of the strings returned
here will be excluded from any analysis.
|
int |
getFrequency(org.semanticweb.owlapi.model.OWLObject obj) |
int |
getFrequency(Set<org.semanticweb.owlapi.model.OWLObject> objs)
as getFrequency(obj), treats objs as a conjunction
|
OWLGraphWrapper |
getGraph() |
Double |
getInformationContent(org.semanticweb.owlapi.model.OWLObject obj)
The IC of an OWLObject is
freq(Obj)/corpusSize
here the frequency of an object is the number of individuals with a graph path up to the object,
and the corpus size is the number of individuals in the graph
|
Double |
getInformationContent(Set<org.semanticweb.owlapi.model.OWLObject> objs) |
Set<org.semanticweb.owlapi.model.OWLObject> |
getLeastCommonSubsumers(org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b)
note that this performs caching by default
|
org.semanticweb.owlapi.model.OWLClassExpression |
getLeastCommonSubsumerSimpleClassExpression(org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b) |
org.semanticweb.owlapi.model.OWLClassExpression |
getLeastCommonSubsumerSimpleClassExpression(org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b,
boolean isIgnoreEdgeLabels) |
int |
getLeastCommonSubsumersSize(org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b) |
Similarity |
getSimilarityAlgorithm(Class c) |
Similarity |
getSimilarityAlgorithm(String name)
factory class for generating a Similarity instance based on its name
|
Set<org.semanticweb.owlapi.model.OWLObject> |
getUnionSubsumers(org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b) |
int |
getUnionSubsumersSize(org.semanticweb.owlapi.model.OWLObject a,
org.semanticweb.owlapi.model.OWLObject b) |
boolean |
hasInformationContent(org.semanticweb.owlapi.model.OWLObject obj) |
boolean |
isExcludedFromAnalysis(org.semanticweb.owlapi.model.OWLObject att)
A class is excluded from the analysis if:
it is a named entity, and the label for that entity matches the exclude labels list
OR: it is a class expression, and the signature contains an excluded class
|
String |
label(org.semanticweb.owlapi.model.OWLObject x) |
org.semanticweb.owlapi.model.OWLClassExpression |
makeIntersectionPair(org.semanticweb.owlapi.model.OWLClassExpression a,
org.semanticweb.owlapi.model.OWLClassExpression b) |
Set<org.semanticweb.owlapi.model.OWLObject> |
makeNonRedundant(Set<org.semanticweb.owlapi.model.OWLObject> objs)
An object x is redundant with a set S if:
there exists an element y of S, such that
y |
Set<org.semanticweb.owlapi.model.OWLObject> |
makeNonRedundant(Set<org.semanticweb.owlapi.model.OWLObject> objs,
boolean prioritizeNamedClasses) |
org.semanticweb.owlapi.model.OWLClassExpression |
makeUnionPair(org.semanticweb.owlapi.model.OWLClassExpression a,
org.semanticweb.owlapi.model.OWLClassExpression b) |
Set<org.semanticweb.owlapi.model.OWLObject> |
nonSignificantObjects() |
void |
setGraph(OWLGraphWrapper graph) |
protected OWLGraphWrapper graph
public boolean excludeClassesInComparison
public org.semanticweb.owlapi.model.OWLObject comparisonSuperclass
public Double minimumIC
public org.semanticweb.owlapi.model.OWLClass comparisonClass
public org.semanticweb.owlapi.model.OWLObjectProperty comparisonProperty
public SimEngine(OWLGraphWrapper wrapper)
public OWLGraphWrapper getGraph()
public void setGraph(OWLGraphWrapper graph)
public Set<String> getExcludedLabels()
public boolean isExcludedFromAnalysis(org.semanticweb.owlapi.model.OWLObject att)
att
- public Similarity getSimilarityAlgorithm(String name) throws SimEngine.SimilarityAlgorithmException
name
- Similarity
SimEngine.SimilarityAlgorithmException
public Similarity getSimilarityAlgorithm(Class c) throws SimEngine.SimilarityAlgorithmException
public Class[] getAllSimilarityAlgorithmClasses()
public Set<org.semanticweb.owlapi.model.OWLObject> getAttributeClosureFor(org.semanticweb.owlapi.model.OWLObject x)
public Set<org.semanticweb.owlapi.model.OWLObject> getAttributesFor(org.semanticweb.owlapi.model.OWLObject x)
public int getCorpusSize()
public int getFrequency(org.semanticweb.owlapi.model.OWLObject obj)
public int getFrequency(Set<org.semanticweb.owlapi.model.OWLObject> objs)
objs
- public Double getInformationContent(org.semanticweb.owlapi.model.OWLObject obj)
obj
- public Double getInformationContent(Set<org.semanticweb.owlapi.model.OWLObject> objs)
public boolean hasInformationContent(org.semanticweb.owlapi.model.OWLObject obj)
public Set<org.semanticweb.owlapi.model.OWLObject> nonSignificantObjects()
public void filterObjects(Set<org.semanticweb.owlapi.model.OWLObject> objs)
public Set<org.semanticweb.owlapi.model.OWLObject> getUnionSubsumers(org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b)
public int getUnionSubsumersSize(org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b)
public Set<org.semanticweb.owlapi.model.OWLObject> getCommonSubsumers(org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b)
a
- b
- public int getCommonSubsumersSize(org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b)
public Set<org.semanticweb.owlapi.model.OWLObject> getLeastCommonSubsumers(org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b)
a
- b
- public int getLeastCommonSubsumersSize(org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b)
public Set<org.semanticweb.owlapi.model.OWLObject> makeNonRedundant(Set<org.semanticweb.owlapi.model.OWLObject> objs)
objs
- public Set<org.semanticweb.owlapi.model.OWLObject> makeNonRedundant(Set<org.semanticweb.owlapi.model.OWLObject> objs, boolean prioritizeNamedClasses)
public org.semanticweb.owlapi.model.OWLClassExpression makeIntersectionPair(org.semanticweb.owlapi.model.OWLClassExpression a, org.semanticweb.owlapi.model.OWLClassExpression b)
a
- b
- public org.semanticweb.owlapi.model.OWLClassExpression makeUnionPair(org.semanticweb.owlapi.model.OWLClassExpression a, org.semanticweb.owlapi.model.OWLClassExpression b)
a
- b
- public org.semanticweb.owlapi.model.OWLClassExpression getLeastCommonSubsumerSimpleClassExpression(org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b)
a
- b
- public org.semanticweb.owlapi.model.OWLClassExpression getLeastCommonSubsumerSimpleClassExpression(org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b, boolean isIgnoreEdgeLabels)
a
- b
- isIgnoreEdgeLabels
- public Set<OWLGraphEdge> extendEdge(OWLGraphEdge e)
public Double calculateSimilarityScore(Similarity m, org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b) throws SimEngine.SimilarityAlgorithmException
m
- a
- b
- SimEngine.SimilarityAlgorithmException
public Similarity calculateSimilarity(Similarity m, org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b) throws SimEngine.SimilarityAlgorithmException
m
- a
- b
- SimEngine.SimilarityAlgorithmException
public Set<Similarity> calculateAllSimilarity(org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b) throws SimEngine.SimilarityAlgorithmException
a
- b
- SimEngine.SimilarityAlgorithmException
public void calculateSimilarityAllByAll(String similarityAlgorithmName, Double minScore) throws SimEngine.SimilarityAlgorithmException
public String label(org.semanticweb.owlapi.model.OWLObject x)
public org.semanticweb.owlapi.model.OWLObject createUnionExpression(org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b, org.semanticweb.owlapi.model.OWLObject c)
public org.semanticweb.owlapi.model.OWLClassExpression edgeSetToExpression(Set<OWLGraphEdge> edges)
Copyright © 2010–2015. All rights reserved.