Interface SMOntologyAggWeighted
- All Superinterfaces:
SimilarityMeasure
,SMOntology
- All Known Subinterfaces:
SMOntologyAggAvg
,SMOntologyAggMin
- All Known Implementing Classes:
SMOntologyAggAvgImpl
,SMOntologyAggMinImpl
,SMOntologyAggWeightedImpl
Calculates the similarity between query and case based on the local similarities of the connected
objects of the query and case entities via specific relations in an ontology. The local
similarity calculations can be defined by the name of the relation, a similarity measure to be
used and a weight for the weighted average.
- Author:
- Tobias Dahlem
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
The default for ignoring missing relations in a query true.static final double
The default similarity value is 1.0.Fields inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
LOG_ORDER_NAME_NOT_FOUND
-
Method Summary
Modifier and TypeMethodDescriptiondouble
boolean
void
setDefaultWeight
(double weight) void
setIgnoreMissingRelationsInQuery
(boolean ignoreMissingRelationsInQuery) void
setInferredRelation
(String relationName, String relationQuery, String relationQueryParamName, String simMeasure, double weight) void
setRelation
(String relationName, String simMeasure, Double weight) Methods inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
compute, getDataClass, getName, getSystemName, isForceOverride, isReusable, setForceOverride
Methods inherited from interface de.uni_trier.wi2.procake.similarity.base.ontology.SMOntology
checkArgumentApplicability, checkInstanceOntologyOrderPredicate
-
Field Details
-
DEFAULT_WEIGHT
static final double DEFAULT_WEIGHTThe default similarity value is 1.0.- See Also:
-
DEFAULT_IGNORE_MISSING_RELATIONS_IN_QUERY
static final boolean DEFAULT_IGNORE_MISSING_RELATIONS_IN_QUERYThe default for ignoring missing relations in a query true.- See Also:
-
-
Method Details
-
setRelation
- Parameters:
relationName
- name of the relation to be inferredsimMeasure
- similarity measure to be usedweight
- weight of the relation
-
setInferredRelation
void setInferredRelation(String relationName, String relationQuery, String relationQueryParamName, String simMeasure, double weight) - Parameters:
relationName
- name of the relation to be inferredrelationQuery
- SPARQL stringrelationQueryParamName
- name of the parameter used in relationQuerysimMeasure
- similarity measure to be usedweight
- weight of the relation
-
getRelations
Map<String,SMOntologyAggWeightedImpl.RelationInfo> getRelations()- Returns:
- map with all registered relations and corresponding weight and similarity measure
-
getDefaultWeight
double getDefaultWeight()- Returns:
- default weight
-
setDefaultWeight
void setDefaultWeight(double weight) - Parameters:
weight
- is the default weight for each relation, which hasn't an own weight
-
isIgnoreMissingRelationsInQuery
boolean isIgnoreMissingRelationsInQuery() -
setIgnoreMissingRelationsInQuery
void setIgnoreMissingRelationsInQuery(boolean ignoreMissingRelationsInQuery)
-