Class AddNegativesViaAlignment
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.util.addnegatives.AddNegativesViaAlignment
- All Implemented Interfaces:
AddNegatives
,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
This component adds negative correspondences to the input alignment via an alignment (generated by a recall optimized matcher).
This matcher is only suitable if the whole matching system is executed only for one test case.
Why? Because the alignment (which is test case specific) need to be passed in the constructor.
Thus it will only give useful results if only used for the correct test case.
The input alignment should contain positive correspondences.
The negatives are generated by looking at the provided alignment in the constructor.
All correspondences which are contained in the input alignment (ground truth) and in the given alignment
(which has a high recall - meaning many correspondences) are assumned to be positives and all
others correspondences which maps a concept of the positive correspondence to another concept are assumed to be negatives.
The returned alignment consists of positives (= relation) and negatives (% incompat relation) which can be used to
train supervised matchers.
-
Field Summary
Fields inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile
FILE_PREFIX, FILE_SUFFIX
-
Constructor Summary
ConstructorDescriptionAddNegativesViaAlignment
(Alignment recallAlignment) Constructor with requires the recall alignment. -
Method Summary
Modifier and TypeMethodDescriptionstatic Alignment
addNegatives
(Alignment recallAlignment, Alignment referenceAlignment) This method returns a training alignment based on a recall alignment and a reference alignment.match
(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment inputAlignment, Properties parameters) Aligns two ontologies specified via a Jena OntModel, with an input alignment as Alignment object, and returns the mapping of the resulting alignment.void
setRecallAlignment
(Alignment recallAlignment) 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, toString, wait, wait, wait
Methods inherited from interface eu.sealsproject.platform.res.tool.api.IPlugin
getId, getVersion
-
Field Details
-
recallAlignment
-
-
Constructor Details
-
AddNegativesViaAlignment
Constructor with requires the recall alignment.- Parameters:
recallAlignment
- the recall alignment should contain many correpondences (high recall).
-
-
Method Details
-
match
public Alignment match(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment inputAlignment, Properties parameters) 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.parameters
- Additional properties.- Returns:
- The resulting alignment of the matching process.
- Throws:
Exception
- Any exception which occurs during matching.
-
getRecallAlignment
-
setRecallAlignment
-
addNegatives
This method returns a training alignment based on a recall alignment and a reference alignment. The training alignment is generated by getting all correspondences in the recall alignment where at least one part is also contained in the reference alignment. If the correspondence is directly in the reference alignment, then it is assumed to be a positive example. If only one part of the correspondence is in the reference alignment, then is is assumed to be a negative correspondence. The result contains the correspondences from the recall alignment, where positive examples have the equivalence relation and negative examples have INCOMPAT relation.- Parameters:
recallAlignment
- recall alignmentreferenceAlignment
- reference alignment which does not need to really be the reference alignment of a track.- Returns:
- the correspondences from the recall alignment, where positive examples have the equivalence relation and negative examples have INCOMPAT relation
-