Class SimilarNeighboursFilter
java.lang.Object
eu.sealsproject.platform.res.tool.impl.AbstractPlugin
de.uni_mannheim.informatik.dws.melt.matching_base.MatcherURL
de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile
de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAA
de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAAJena
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.filter.BaseFilterWithSetComparison
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.filter.instance.SimilarNeighboursFilter
- All Implemented Interfaces:
Filter
,IMatcher<org.apache.jena.ontology.OntModel,
,Alignment, Properties> eu.sealsproject.platform.res.domain.omt.IOntologyMatchingToolBridge
,eu.sealsproject.platform.res.tool.api.IPlugin
,eu.sealsproject.platform.res.tool.api.IToolBridge
Checks for each instance mapping, how many already matched neighbours it has.
Source_Subject ------Source_Property------Source_Object | | subjectCorrespondence objectCorrespondence | | Target_Subject ------Target_Property------Target_Object
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
A function which returns a set of elements (uri as string and/or text filtered with literalprocessing function) which should be ignored.A function which processes a literal and returns some comparable (equals/hashCode) representation (usually a normalized text).private double
The minimum confidence for which a resource(neighbour) mapping is counted.private Predicate<org.apache.jena.rdf.model.Property>
Predicate to decide which properties should be counted.private boolean
private boolean
private boolean
private boolean
Fields inherited from class de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.filter.BaseFilterWithSetComparison
setSimilarity, threshold
Fields inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile
FILE_PREFIX, FILE_SUFFIX
-
Constructor Summary
ConstructorDescriptionSimilarNeighboursFilter
(double threshold, SetSimilarity setSimilarity) SimilarNeighboursFilter
(double minResourceConfidence, Predicate<org.apache.jena.rdf.model.Property> shouldPropertyBeCounted, double threshold, SetSimilarity setSimilatity) ConstructorSimilarNeighboursFilter
(double minResourceConfidence, Predicate<org.apache.jena.rdf.model.Property> shouldPropertyBeCounted, Function<org.apache.jena.rdf.model.Literal, Object> literalProcessingFunction, Function<org.apache.jena.rdf.model.Resource, Set<Object>> excludeNeighbours, boolean useIngoing, boolean useOutgoing, boolean useResource, boolean useLiteral, double threshold, SetSimilarity setSimilarity) ConstructorSimilarNeighboursFilter
(double minResourceConfidence, Predicate<org.apache.jena.rdf.model.Property> shouldPropertyBeCounted, Function<org.apache.jena.rdf.model.Literal, Object> literalProcessingFunction, Function<org.apache.jena.rdf.model.Resource, Set<Object>> excludeNeighbours, double threshold, SetSimilarity setSimilarity) Constructor which uses ingoing and outgoing edges as well as resources and literals.SimilarNeighboursFilter
(Function<org.apache.jena.rdf.model.Literal, Object> literalProcessingFunction, double threshold, SetSimilarity setSimilatity) -
Method Summary
Modifier and TypeMethodDescriptioncreateExcludeNeighboursFunction
(Set<org.apache.jena.rdf.model.Property> excludeLiteralProeprties, Function<org.apache.jena.rdf.model.Literal, Object> literalProcessingFunction) double
private Neighbours
getNeighbours
(org.apache.jena.ontology.OntModel model, org.apache.jena.ontology.Individual individual) Predicate<org.apache.jena.rdf.model.Property>
boolean
boolean
boolean
boolean
boolean
match
(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment inputAlignment, Properties properties) Aligns two ontologies specified via a Jena OntModel, with an input alignment as Alignment object, and returns the mapping of the resulting alignment.void
setAddNeighboursToCorrespondence
(boolean addNeighboursToCorrespondence) void
setLiteralProcessingFunction
(Function<org.apache.jena.rdf.model.Literal, Object> literalProcessingFunction) void
setMinResourceConfidence
(double minResourceConfidence) void
setShouldPropertyBeCounted
(Predicate<org.apache.jena.rdf.model.Property> shouldPropertyBeCounted) void
setUseIngoing
(boolean useIngoing) void
setUseLiteral
(boolean useLiteral) void
setUseOutgoing
(boolean useOutgoing) void
setUseResource
(boolean useResource) toString()
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.filter.BaseFilterWithSetComparison
getSetSimilarity, getThreshold, setSetSimilarity, setThreshold
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAAJena
getModelSpec, match, readOntology
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAA
match
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile
match
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherURL
align, align, canExecute, getType
Methods inherited from class eu.sealsproject.platform.res.tool.impl.AbstractPlugin
getId, getVersion, setId, setVersion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface eu.sealsproject.platform.res.tool.api.IPlugin
getId, getVersion
-
Field Details
-
minResourceConfidence
private double minResourceConfidenceThe minimum confidence for which a resource(neighbour) mapping is counted. Compared with greater or equal. -
shouldPropertyBeCounted
Predicate to decide which properties should be counted. -
literalProcessingFunction
A function which processes a literal and returns some comparable (equals/hashCode) representation (usually a normalized text). -
excludeNeighbours
A function which returns a set of elements (uri as string and/or text filtered with literalprocessing function) which should be ignored. -
useIngoing
private boolean useIngoing -
useOutgoing
private boolean useOutgoing -
useResource
private boolean useResource -
useLiteral
private boolean useLiteral -
addNeighboursToCorrespondence
private boolean addNeighboursToCorrespondence
-
-
Constructor Details
-
SimilarNeighboursFilter
public SimilarNeighboursFilter(double minResourceConfidence, Predicate<org.apache.jena.rdf.model.Property> shouldPropertyBeCounted, Function<org.apache.jena.rdf.model.Literal, Object> literalProcessingFunction, Function<org.apache.jena.rdf.model.Resource, Set<Object>> excludeNeighbours, boolean useIngoing, boolean useOutgoing, boolean useResource, boolean useLiteral, double threshold, SetSimilarity setSimilarity) Constructor- Parameters:
minResourceConfidence
- the confidence for which a neighbour is counted as a mapping (greater or equal).shouldPropertyBeCounted
- Predicate to decide which properties should be counted.literalProcessingFunction
- A function which processes a literal and returns some comparable (equals/hashCode) representation (usually a normalized text) .excludeNeighbours
- A function which returns a set of elements (uri as string and/or text filtered with literalprocessing function) which should be ignored.useIngoing
- use ingoing edgesuseOutgoing
- use outgoing edgesuseResource
- use resourcesuseLiteral
- use literalsthreshold
- The filtering threshold which should be larger or equal to be a valid match. Computation is based on set similarity.setSimilarity
- The set similarity to choose when computing similarity value between the two distinct property sets.
-
SimilarNeighboursFilter
public SimilarNeighboursFilter(double minResourceConfidence, Predicate<org.apache.jena.rdf.model.Property> shouldPropertyBeCounted, Function<org.apache.jena.rdf.model.Literal, Object> literalProcessingFunction, Function<org.apache.jena.rdf.model.Resource, Set<Object>> excludeNeighbours, double threshold, SetSimilarity setSimilarity) Constructor which uses ingoing and outgoing edges as well as resources and literals.- Parameters:
minResourceConfidence
- the confidence for which a neighour is counted as a mapping (greater or equal).shouldPropertyBeCounted
- Predicate to decide which properties should be counted.literalProcessingFunction
- A function which processes a literal and returns some comparable (equals/hashCode) representation (usually a normalized text) .excludeNeighbours
- A function which returns a set of elements (uri and text) which should be ignored.threshold
- The filtering threshold which should be larger or equal to be a valid match. Computation is based on set similarity.setSimilarity
- The set similarity to choose when computing similarity value between the two distinct property sets.
-
SimilarNeighboursFilter
public SimilarNeighboursFilter(double minResourceConfidence, Predicate<org.apache.jena.rdf.model.Property> shouldPropertyBeCounted, double threshold, SetSimilarity setSimilatity) Constructor- Parameters:
minResourceConfidence
- the confidence for which a neighbour is counted as a mapping (greater or equal).shouldPropertyBeCounted
- Predicate to decide which properties should be counted.threshold
- The filtering threshold which should be larger or equal to be a valid match. Computation is based on set similarity.setSimilatity
- The set similarity to choose when computing similarity value between the two distinct property sets.
-
SimilarNeighboursFilter
public SimilarNeighboursFilter(Function<org.apache.jena.rdf.model.Literal, Object> literalProcessingFunction, double threshold, SetSimilarity setSimilatity) -
SimilarNeighboursFilter
-
SimilarNeighboursFilter
public SimilarNeighboursFilter()
-
-
Method Details
-
match
public Alignment match(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment inputAlignment, Properties properties) throws Exception Description copied from class:MatcherYAAAJena
Aligns two ontologies specified via a Jena OntModel, with an input alignment as Alignment object, and returns the mapping of the resulting alignment. Note: This method might be called multiple times in a row when using the evaluation framework. Make sure to return a mapping which is specific to the given inputs.- Specified by:
match
in interfaceIMatcher<org.apache.jena.ontology.OntModel,
Alignment, Properties> - Specified by:
match
in classMatcherYAAAJena
- Parameters:
source
- This OntModel represents the source ontology.target
- This OntModel represents the target ontology.inputAlignment
- This mapping represents the input alignment.properties
- Additional properties.- Returns:
- The resulting alignment of the matching process.
- Throws:
Exception
- Any exception which occurs during matching.
-
getNeighbours
private Neighbours getNeighbours(org.apache.jena.ontology.OntModel model, org.apache.jena.ontology.Individual individual) -
getMinResourceConfidence
public double getMinResourceConfidence() -
setMinResourceConfidence
public void setMinResourceConfidence(double minResourceConfidence) -
getShouldPropertyBeCounted
-
setShouldPropertyBeCounted
public void setShouldPropertyBeCounted(Predicate<org.apache.jena.rdf.model.Property> shouldPropertyBeCounted) -
getLiteralProcessingFunction
-
setLiteralProcessingFunction
-
isUseIngoing
public boolean isUseIngoing() -
setUseIngoing
public void setUseIngoing(boolean useIngoing) -
isUseOutgoing
public boolean isUseOutgoing() -
setUseOutgoing
public void setUseOutgoing(boolean useOutgoing) -
isUseResource
public boolean isUseResource() -
setUseResource
public void setUseResource(boolean useResource) -
isUseLiteral
public boolean isUseLiteral() -
setUseLiteral
public void setUseLiteral(boolean useLiteral) -
isAddNeighboursToCorrespondence
public boolean isAddNeighboursToCorrespondence() -
setAddNeighboursToCorrespondence
public void setAddNeighboursToCorrespondence(boolean addNeighboursToCorrespondence) -
createExcludeNeighboursFunction
-
toString
-