Class AddNegativesViaMatcher
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.AddNegativesViaMatcher
- All Implemented Interfaces:
AddNegatives
,IMatcher<org.apache.jena.ontology.OntModel,
,Alignment, Properties> IMatcherCaller
,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 a recall optimized matcher.
This also means that the input alignment should contain positive correspondences.
After applying the recallMatcher given in the constructor, a new alignment is returned which
contains positive (equivalence relation) and negative(incompat relation) correspondences.
With the help of this alignment, supervised matchers can be trained.
-
Field Summary
Fields inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile
FILE_PREFIX, FILE_SUFFIX
-
Constructor Summary
ConstructorDescriptionAddNegativesViaMatcher
(Object recallMatcher) Constructor with requires the recall matcher -
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
(Set<Object> sourceRepresentations, Set<Object> targetRepresentations, Object inputAlignment, Object parameters) Aligns two ontologies/knowledge graphs given as the first and second parameter.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.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
-
recallMatcher
-
-
Constructor Details
-
AddNegativesViaMatcher
Constructor with requires the recall matcher- Parameters:
recallMatcher
- this matcher should return many (even wrong) correspondences.
-
-
Method Details
-
match
public AlignmentAndParameters match(Set<Object> sourceRepresentations, Set<Object> targetRepresentations, Object inputAlignment, Object parameters) throws Exception Description copied from interface:IMatcherCaller
Aligns two ontologies/knowledge graphs given as the first and second parameter. An additional input alignment can be given as well as parameters which further define how and what to match. In case the matcher needs the objects in a specific type, callTODO
- Specified by:
match
in interfaceIMatcherCaller
- Parameters:
sourceRepresentations
- a set of objects which all represents the source ontology/knowledge graphtargetRepresentations
- a set of objects which all represents the target ontology/knowledge graphinputAlignment
- this object represents the input alignmentparameters
- object representing additional parameters. Sensible classes areProperties
, Map<String, Object> or any similar data structure. Some already specified keys (strings) can be found atParameterConfigKeys
.- Returns:
- the resulting alignment and updated parameters of the matching process.
- Throws:
Exception
- any exception which occurs during matching
-
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.
-
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
-