Class AlignmentAnalyzerResult
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.metric.alignmentanalyzer.AlignmentAnalyzerResult
The AlignmentAnalyzerResult is the output of the
AlignmentAnalyzerMetric
.- Author:
- Jan Portisch
-
Field Summary
Modifier and TypeFieldDescriptionWhich arity occurs how oftenprivate ExecutionResult
Execution result that was analyzed.This data structure keeps track of the frequency of different mapping types, e.g.private Map<CorrespondenceRelation,
Integer> The distribution of relations in the given mapping.private boolean
Indicates whether only resources of the same type are matched e.g.private static org.slf4j.Logger
Logger for this class.private double
The maximum confidence score that is used in the given alignment.private double
The minimum confidence score that is used in the given alignment.private String
If this string is not empty, then it contains the parsing error message.private int
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.private int
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.Which URIs in the alignment are not found in source nor target ontology. -
Constructor Summary
ConstructorDescriptionAlignmentAnalyzerResult
(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 -
Method Summary
Modifier and TypeMethodDescriptionReturn the map of arity to corresponding counts.Returns the frequency of different mapping types.Returns frequencies of relations in the given mapping.Returns a set of different mapping types (e.g.double
Get the maximum confidence score of the alignmentdouble
Get the minimum confidence score of the alignment.int
Returns the size of the mapping.If this string is not empty, then it contains the parsing error message.Returns a set of the different mapping relations (e.g.Get a textual report of the alignment as String.int
Returns the number of URIs in correct position.int
Returns the number of URIs NOT in correct position.Returns a list of URIs which are found not in source nor target ontology.boolean
Return true, if there is a parsing error.boolean
Returns true if each cell in the mapping uses the equivalence relation.boolean
Checks whether the confidence scores of the given mapping are all equal to 1.0.boolean
Returns true if the alignment is heterogenous, i.e., whether any resource types can be matched with each other e.g.boolean
Returns true if the alignment is homogenous, i.e., whether only resources of the same type are matched e.g.boolean
Tests if a switch of source and target URIs makes sense e.g.void
void
void
Print a textual report using the logger.void
Print a textual report of the alignment to the console.toString()
-
Field Details
-
LOGGER
private static org.slf4j.Logger LOGGERLogger for this class. -
executionResult
Execution result that was analyzed. -
minimumConfidence
private double minimumConfidenceThe minimum confidence score that is used in the given alignment. -
maximumConfidence
private double maximumConfidenceThe maximum confidence score that is used in the given alignment. -
frequenciesOfRelations
The distribution of relations in the given mapping. Example: EQUIVALENCE → 40 -
isHomogenousAlingment
private boolean isHomogenousAlingmentIndicates whether only resources of the same type are matched e.g. classes with classes and object properties with object properites. -
frequenciesOfMappingTypes
This data structure keeps track of the frequency of different mapping types, e.g. "class - class" → 55 -
urisCorrectPosition
private int urisCorrectPositionHow 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 urisIncorrectPositionHow 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
Which URIs in the alignment are not found in source nor target ontology. -
arityCounts
Which arity occurs how often -
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
-
getErroneousReport
-
logReport
public void logReport() -
logErroneousReport
public void logErroneousReport() -
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
Returns a set of the different mapping relations (e.g. "=" or ">") that are used in the mapping.- Returns:
- Mapping relations used as set.
-
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
Returns the frequency of different mapping types. e.g. "class - class" → 55- Returns:
- Distribution of mapping types.
-
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
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
Return the map of arity to corresponding counts.- Returns:
- map of arity to corresponding counts.
-
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.
-