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

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.
  • Field Summary

    Fields
    Modifier and Type Field Description
    private Object recallMatcher  

    Fields inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile

    FILE_PREFIX, FILE_SUFFIX
  • Constructor Summary

    Constructors
    Constructor Description
    AddNegativesViaMatcher​(Object recallMatcher)
    Constructor with requires the recall matcher
  • Method Summary

    Modifier and Type Method Description
    static Alignment addNegatives​(Alignment recallAlignment, Alignment referenceAlignment)
    This method returns a training alignment based on a recall alignment and a reference alignment.
    AlignmentAndParameters match​(Set<Object> sourceRepresentations, Set<Object> targetRepresentations, Object inputAlignment, Object parameters)
    Aligns two ontologies/knowledge graphs given as the first and second parameter.
    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.

    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

      private final Object recallMatcher
  • Constructor Details

    • AddNegativesViaMatcher

      public AddNegativesViaMatcher​(Object recallMatcher)
      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, call
       
       TODO
       
       
      Specified by:
      match in interface IMatcherCaller
      Parameters:
      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 ParameterConfigKeys.
      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 interface IMatcher<org.apache.jena.ontology.OntModel,​Alignment,​Properties>
      Specified by:
      match in class MatcherYAAAJena
      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

      public static Alignment addNegatives​(Alignment recallAlignment, Alignment referenceAlignment)
      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 alignment
      referenceAlignment - 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