Package org.aksw.deer.enrichments
Class DereferencingEnrichmentOperator
- java.lang.Object
-
- org.aksw.faraday_cage.engine.AbstractExecutionNode<T>
-
- org.aksw.faraday_cage.engine.AbstractParameterizedExecutionNode<Model>
-
- org.aksw.deer.enrichments.AbstractParameterizedEnrichmentOperator
-
- org.aksw.deer.enrichments.DereferencingEnrichmentOperator
-
- All Implemented Interfaces:
DeerExecutionNode,DeerPlugin,EnrichmentOperator,ParameterizedEnrichmentOperator,Learnable,ReverseLearnable,SelfConfigurable,ParameterizedDeerExecutionNode,ExecutionNode<Model>,Parameterized,Plugin,org.pf4j.ExtensionPoint
@Extension public class DereferencingEnrichmentOperator extends AbstractParameterizedEnrichmentOperator implements ReverseLearnable, SelfConfigurable
An EnrichmentOperator for dereferencing.Dereferencing is a method of expanding knowledge of resources that belong to an external knowledge base. We define a dereferencing operation as the following sequence of operations:
- Query the local model for starting resources
?xthat belong to an external knowledge base - Query the external knowledge base for triples
(?x, d, ?y), where d is a defined property path in the external knowledge base. - Add all results to the local model in the form of
(?x, i, ?y), where i is the property name under which they should be imported.
Configuration
Each operation corresponds to one dereferencing operation, allowing multiple dereferencing operations being carried out by a single:operationsDereferencingEnrichmentOperator. Each entry may contain the following properties::lookUpPropertyrange: resource
Determines the starting resources?xas all objects of triples having the value of:lookUpPropertyas predicate.:lookUpPrefix[required] range: string
Determines the starting resources?xas all objects of triples having the value of:lookUpPropertyas predicate.:dereferencingProperty[required] range: resource
Look up the values to be imported to the local model in the external knowledge base using the property defined by the value of:dereferencingProperty.:importProperty[required] range: resource
Add looked up values to starting resources using the value of :importProperty.Example
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.aksw.faraday_cage.engine.ExecutionNode
ExecutionNode.DegreeBounds
-
-
Field Summary
Fields Modifier and Type Field Description static PropertyDEREFERENCING_PROPERTYstatic PropertyIMPORT_PROPERTYstatic PropertyLOOKUP_PREFIXstatic PropertyLOOKUP_PROPERTYstatic PropertyOPERATIONstatic PropertyUSE_SPARQL_ENDPOINT-
Fields inherited from class org.aksw.deer.enrichments.AbstractParameterizedEnrichmentOperator
description, documentationURL
-
-
Constructor Summary
Constructors Constructor Description DereferencingEnrichmentOperator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidatableParameterMapcreateParameterMap()Create an uninitializedParameterMapto be filled by theExecutionGraphGenerator.java.lang.StringgetDescription()ExecutionNode.DegreeBoundsgetLearnableDegreeBounds()voidinitializeOperations()ValidatableParameterMaplearnParameterMap(java.util.List<Model> inputs, Model target, ValidatableParameterMap prototype)doublepredictApplicability(java.util.List<Model> inputs, Model target)java.util.List<Model>reverseApply(java.util.List<Model> inputs, Model target)protected java.util.List<Model>safeApply(java.util.List<Model> models)-
Methods inherited from class org.aksw.deer.enrichments.AbstractParameterizedEnrichmentOperator
deepCopy, getDegreeBounds, getDocumentationURL, getType
-
Methods inherited from class org.aksw.faraday_cage.engine.AbstractParameterizedExecutionNode
getParameterMap, getValidationModelFor, initParameters, isInitialized
-
Methods inherited from class org.aksw.faraday_cage.engine.AbstractExecutionNode
apply, getId, getInDegree, getOutDegree, initDegrees, initPluginId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.aksw.faraday_cage.engine.ExecutionNode
apply, getInDegree, getOutDegree, initDegrees
-
Methods inherited from interface org.aksw.faraday_cage.engine.Parameterized
getParameterMap, initParameters, isInitialized
-
Methods inherited from interface org.aksw.faraday_cage.engine.Plugin
getId, initPluginId, isInitialized
-
-
-
-
Field Detail
-
LOOKUP_PROPERTY
public static final Property LOOKUP_PROPERTY
-
LOOKUP_PREFIX
public static final Property LOOKUP_PREFIX
-
DEREFERENCING_PROPERTY
public static final Property DEREFERENCING_PROPERTY
-
IMPORT_PROPERTY
public static final Property IMPORT_PROPERTY
-
OPERATION
public static final Property OPERATION
-
USE_SPARQL_ENDPOINT
public static final Property USE_SPARQL_ENDPOINT
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceDeerPlugin- Overrides:
getDescriptionin classAbstractParameterizedEnrichmentOperator
-
createParameterMap
public ValidatableParameterMap createParameterMap()
Description copied from interface:ParameterizedCreate an uninitializedParameterMapto be filled by theExecutionGraphGenerator.- Specified by:
createParameterMapin interfaceParameterized- Returns:
- uninitialized
ParameterMapcontaining all allowedParameter
-
initializeOperations
public void initializeOperations()
-
safeApply
protected java.util.List<Model> safeApply(java.util.List<Model> models)
- Specified by:
safeApplyin classAbstractExecutionNode<Model>
-
predictApplicability
public double predictApplicability(java.util.List<Model> inputs, Model target)
- Specified by:
predictApplicabilityin interfaceReverseLearnable
-
reverseApply
public java.util.List<Model> reverseApply(java.util.List<Model> inputs, Model target)
- Specified by:
reverseApplyin interfaceReverseLearnable
-
learnParameterMap
public ValidatableParameterMap learnParameterMap(java.util.List<Model> inputs, Model target, ValidatableParameterMap prototype)
- Specified by:
learnParameterMapin interfaceSelfConfigurable
-
getLearnableDegreeBounds
public ExecutionNode.DegreeBounds getLearnableDegreeBounds()
- Specified by:
getLearnableDegreeBoundsin interfaceLearnable
-
-