java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.metric.alignmentanalyzer.AlignmentAnalyzerResult

public class AlignmentAnalyzerResult extends Object
The AlignmentAnalyzerResult is the output of the AlignmentAnalyzerMetric.
Author:
Jan Portisch
  • Field Details

    • LOGGER

      private static org.slf4j.Logger LOGGER
      Logger for this class.
    • executionResult

      private ExecutionResult executionResult
      Execution result that was analyzed.
    • minimumConfidence

      private double minimumConfidence
      The minimum confidence score that is used in the given alignment.
    • maximumConfidence

      private double maximumConfidence
      The maximum confidence score that is used in the given alignment.
    • frequenciesOfRelations

      private Map<CorrespondenceRelation,Integer> frequenciesOfRelations
      The distribution of relations in the given mapping. Example: EQUIVALENCE → 40
    • isHomogenousAlingment

      private boolean isHomogenousAlingment
      Indicates whether only resources of the same type are matched e.g. classes with classes and object properties with object properites.
    • frequenciesOfMappingTypes

      private Map<String,Integer> frequenciesOfMappingTypes
      This data structure keeps track of the frequency of different mapping types, e.g. "class - class" → 55
    • urisCorrectPosition

      private int urisCorrectPosition
      How many URIs are in correct position which means entity one in correspondence is found in source ontology and entity two is found in target ontology.
    • urisIncorrectPosition

      private int urisIncorrectPosition
      How many URIs are NOT in correct position which means entity one in correspondence is found in target ontology and entity two is found in source ontology.
    • urisNotFound

      private List<String> urisNotFound
      Which URIs in the alignment are not found in source nor target ontology.
    • arityCounts

      private Map<Arity,Integer> arityCounts
      Which arity occurs how often
    • parsingErrorMessage

      private String parsingErrorMessage
      If this string is not empty, then it contains the parsing error message.
  • Constructor Details

    • AlignmentAnalyzerResult

      AlignmentAnalyzerResult(ExecutionResult executionResult, double minimumConfidence, double maximumConfidence, Map<CorrespondenceRelation,Integer> frequenciesOfRelations, boolean isHomogenousAlingment, Map<String,Integer> frequenciesOfMappingTypes, int urisCorrectPosition, int urisIncorrectPosition, List<String> urisNotFound, Map<Arity,Integer> arityCounts, String parsingErrorMessage)
      Constructor
      Parameters:
      executionResult - Execution result that was analyzed.
      minimumConfidence - The minimum confidence score that is used in the given alignment.
      maximumConfidence - The maximum confidence score that is used in the given alignment.
      frequenciesOfRelations - The distribution of relations in the given mapping.
      isHomogenousAlingment - Indicator on whether only resources of the same type are matched.
      frequenciesOfMappingTypes - Frequency of different mapping types.
      urisCorrectPosition - How often source and target URIs were correct in the alignment file.
      urisIncorrectPosition - How often source and target URIs were incorrect in the alignment file.
      urisNotFound - List of URIs that cannot be found in the ontologies to be matched.
      arityCounts - Distribution of arities.
      parsingErrorMessage - the parsing error message if one exists
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getErroneousReport

      public String getErroneousReport()
    • logReport

      public void logReport()
    • logErroneousReport

      public void logErroneousReport()
    • getReportForAlignment

      public String getReportForAlignment()
      Get a textual report of the alignment as String.
      Returns:
      Textual report.
    • getMinimumConfidence

      public double getMinimumConfidence()
      Get the minimum confidence score of the alignment.
      Returns:
      Minimum confidence as double.
    • getMaximumConfidence

      public double getMaximumConfidence()
      Get the maximum confidence score of the alignment
      Returns:
      Maximum confidence as double.
    • isConfidenceScoresAreAlwaysOne

      public boolean isConfidenceScoresAreAlwaysOne()
      Checks whether the confidence scores of the given mapping are all equal to 1.0.
      Returns:
      True if confidence scores = 1.0; else false.
    • isAlwaysEqualityRelation

      public boolean isAlwaysEqualityRelation()
      Returns true if each cell in the mapping uses the equivalence relation. If multiple relations are used, false will be returned.
      Returns:
      True if the only relation in the alignment is equality, else false.
    • getRelationsUsed

      public HashSet<CorrespondenceRelation> getRelationsUsed()
      Returns a set of the different mapping relations (e.g. "=" or ">") that are used in the mapping.
      Returns:
      Mapping relations used as set.
    • getMappingTypesUsed

      public HashSet<String> getMappingTypesUsed()
      Returns a set of different mapping types (e.g. CLASS-CLASS) that are used in the mapping
      Returns:
      Mapping types used as set.
    • isHomogenousAlignment

      public boolean isHomogenousAlignment()
      Returns true if the alignment is homogenous, i.e., whether only resources of the same type are matched e.g. classes with classes and object properties with object properites.
      Returns:
      True if homogenous, else false.
    • isHeterogenousAlignment

      public boolean isHeterogenousAlignment()
      Returns true if the alignment is heterogenous, i.e., whether any resource types can be matched with each other e.g. object properties with classes.
      Returns:
      True if heterogenous else false.
    • getFrequenciesOfMappingTypes

      public Map<String,Integer> getFrequenciesOfMappingTypes()
      Returns the frequency of different mapping types. e.g. "class - class" → 55
      Returns:
      Distribution of mapping types.
    • getFrequenciesOfRelations

      public Map<CorrespondenceRelation,Integer> getFrequenciesOfRelations()
      Returns frequencies of relations in the given mapping. Example: EQUIVALENCE → 40
      Returns:
      Mapping of type relation → frequency.
    • printReportForAlignmentToConsole

      public void printReportForAlignmentToConsole()
      Print a textual report of the alignment to the console.
    • getNumberOfCorrespondences

      public int getNumberOfCorrespondences()
      Returns the size of the mapping.
      Returns:
      Size of the mapping as integer.
    • logReportForAlignmentToConsole

      public void logReportForAlignmentToConsole()
      Print a textual report using the logger.
    • getUrisCorrectPosition

      public int getUrisCorrectPosition()
      Returns the number of URIs in correct position. This means entity one in correspondence is found in source ontology and entity two is found in target ontology.
      Returns:
      number of URIs in correct position
    • getUrisIncorrectPosition

      public int getUrisIncorrectPosition()
      Returns the number of URIs NOT in correct position. This means entity one in correspondence is found in target ontology and entity two is found in source ontology.
      Returns:
      number of URIs NOT in correct position
    • isSwitchOfSourceTargetBetter

      public boolean isSwitchOfSourceTargetBetter()
      Tests if a switch of source and target URIs makes sense e.g. more first entities of correspondnce are found in target ontology and not source ontology.
      Returns:
      True if a switch of source and target URIs makes sense .
    • getUrisNotFound

      public List<String> getUrisNotFound()
      Returns a list of URIs which are found not in source nor target ontology.
      Returns:
      List of URIs which are found not in source nor target ontology
    • getArityCounts

      public Map<Arity,Integer> getArityCounts()
      Return the map of arity to corresponding counts.
      Returns:
      map of arity to corresponding counts.
    • getParsingErrorMessage

      public String getParsingErrorMessage()
      If this string is not empty, then it contains the parsing error message.
      Returns:
      the parsing error message
    • hasParsingError

      public boolean hasParsingError()
      Return true, if there is a parsing error.
      Returns:
      return true, if there is a parsing error.