- All Implemented Interfaces:
public class AddNegativesViaMatcher extends MatcherYAAAJena implements IMatcherCaller, AddNegatives
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.
Fields Modifier and Type Field Description
Constructors Constructor Description
Object recallMatcher)(Constructor with requires the recall matcher
Modifier and Type Method Description
Alignment recallAlignment, Alignment referenceAlignment)(This method returns a training alignment based on a recall alignment and a reference alignment.
Set<Object> sourceRepresentations, Set<Object> targetRepresentations, Object inputAlignment, Object parameters)(Aligns two ontologies/knowledge graphs given as the first and second parameter.
Alignment inputAlignment, Properties parameters)(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target,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_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
recallMatcherprivate final Object recallMatcher
AddNegativesViaMatcherpublic AddNegativesViaMatcher(Object recallMatcher)Constructor with requires the recall matcher
recallMatcher- this matcher should return many (even wrong) correspondences.
matchpublic AlignmentAndParameters match(Set<Object> sourceRepresentations, Set<Object> targetRepresentations, Object inputAlignment, Object parameters) throws ExceptionDescription copied from interface:
IMatcherCallerAligns 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, call
- Specified by:
sourceRepresentations- a set of objects which all represents the source ontology/knowledge graph
targetRepresentations- a set of objects which all represents the target ontology/knowledge graph
inputAlignment- this object represents the input alignment
parameters- object representing additional parameters. Sensible classes are
Properties, Map<String, Object> or any similar data structure. Some already specified keys (strings) can be found at
- the resulting alignment and updated parameters of the matching process.
Exception- any exception which occurs during matching
matchpublic Alignment match(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment inputAlignment, Properties parameters) throws ExceptionDescription copied from class:
MatcherYAAAJenaAligns 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:
- Specified by:
source- This OntModel represents the source ontology.
target- This OntModel represents the target ontology.
inputAlignment- This mapping represents the input alignment.
parameters- Additional properties.
- The resulting alignment of the matching process.
Exception- Any exception which occurs during matching.
addNegativesThis 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.
recallAlignment- recall alignment
referenceAlignment- reference alignment which does not need to really be the reference alignment of a track.
- the correspondences from the recall alignment, where positive examples have the equivalence relation and negative examples have INCOMPAT relation