Algebraic operations are possible on networks of ontologies, alignments, relations and confidence measures.
They are increasingly supported by using Algebras of relations. We present below the algebraic interface offered by each class of the API.
The OntologyNetwork interface of the API defines the following operators:
In addition, our BasicOntologyNetwork implementation offers:
The Alignment interface of the API defines the following operators:
In addition, our BasicAlignment implementation offers:
The Cell interface of the API the following operations:
Strictly speaking, if one considers the semantics of relations and confidence measures, the composition of two cells should provide a set (conjunction of cells).
The Relation interface of the API offers the following operations:
In addition, the DisjunctiveRelation interface of the implentation offers:
Various relation languages may be used in the Alignment API. They have to be declared through BasicAlignment.setRelationType( className ) such that classname is the name of a class implementing the Relation interface. It is also recorded in the Alignment format through the relationClass attribute.
By default, the implementation is fr.inrialpes.exmo.align.impl.BasicRelation.
The BasicRelation implementation only has two inverse relations (⊆ and ⊇) the other being self-inverse. It implements the following composition table:
⊆ | = | ⊇ | |
⊆ | ⊆ | ⊆ | ⊥ |
= | ⊆ | = | ⊇ |
⊇ | ⊥ | ⊇ | ⊇ |
Other such classes have been implemented in the Alignment API in order to support an increasing number of operations. These are (supported operations in parenthesis):
Only the AlgebraRelation interface offers the formally defined operations of algebras of relations. The current implementation of the API offers several algebras of relations:
There is no Confidence component in the API. However, the implementation of the API has such a generic component, even if all their values are implemented as double.
The confidence measures should implement a triangular co-norm structure.
The BasicConfidence class offers the two operations:
Such relations algebra may be used from the Alignment format (including EDOAL alignments), through the use of the relationClass extension in the alignment header:
<Alignment> <xml>yes</xml> <level>0</level> <type>**</type> <relationClass>fr.inrialpes.exmo.align.impl.rel.A5AlgebraRelation</relationClass> <onto1> ...
In principle, defining a new algebra of relations amounts to provide:
However, due to Java limitations, we have not been able to do so. The best solution that we found amounts to duplicate an existing algebra such as A5RelationAlgebra and A5BaseRelation and to modify only the parts above.
More precisely, in A5BaseRelation, declare the set of base relations with its label:
EQUIV ( "=" ), SUBSUMED( "<" ), SUBSUME( ">" ), OVERLAP( ")(" ), DISJOINT( "%" );Then, in A5RelationAlgebra, declare all these relations and their inverse (the identity relation comes first):
declareRelation( A5BaseRelation.EQUIV, A5BaseRelation.EQUIV ); declareRelation( A5BaseRelation.SUBSUME, A5BaseRelation.SUBSUMED ); declareRelation( A5BaseRelation.SUBSUMED, A5BaseRelation.SUBSUME ); declareRelation( A5BaseRelation.OVERLAP, A5BaseRelation.OVERLAP ); declareRelation( A5BaseRelation.DISJOINT, A5BaseRelation.DISJOINT );and the composition table:
// ---- EQUIV o( A5BaseRelation.EQUIV, A5BaseRelation.EQUIV, A5BaseRelation.EQUIV ); o( A5BaseRelation.EQUIV, A5BaseRelation.SUBSUME, A5BaseRelation.SUBSUME ); o( A5BaseRelation.EQUIV, A5BaseRelation.SUBSUMED, A5BaseRelation.SUBSUMED ); o( A5BaseRelation.EQUIV, A5BaseRelation.OVERLAP, A5BaseRelation.OVERLAP ); o( A5BaseRelation.EQUIV, A5BaseRelation.DISJOINT, A5BaseRelation.DISJOINT ); // ---- SUBSUME o( A5BaseRelation.SUBSUME, A5BaseRelation.EQUIV, A5BaseRelation.SUBSUME ); o( A5BaseRelation.SUBSUME, A5BaseRelation.SUBSUME, A5BaseRelation.SUBSUME ); ...Alternatively the composition table can be described through a set of consistent triples (example from the A2 algebra):
t( A2BaseRelation.EQUIV, A2BaseRelation.EQUIV, A2BaseRelation.EQUIV ); t( A2BaseRelation.EQUIV, A2BaseRelation.DIFF, A2BaseRelation.DIFF ); t( A2BaseRelation.DIFF, A2BaseRelation.DIFF, A2BaseRelation.DIFF );
Finally, in the two Java classes, the names A5BaseRelation and A5RelationAlgebra should be globally replaced by their new names.
The new algebra can be used as the others predefined ones. In fact, it is not even necessary to define A5BaseRelation as public it may be kept private to the Algebra file.
Alignments may express relations from different standpoints or consider different types of entities (concepts, properties, individuals). Algebras of relations for such situations (such as A16) may be obtained by combining simpler algebras of relations.
This is ongoing work which will come in due time to the Alignement API either through an offline algebra generator (generating Java classes implementing the combined algebra) or through an online combinator (able to interpret the combination of algebras on the fly).
Besides the composition of alignments, it is possible to compose matching methods.
One of the claimed advantages of providing a format for alignments is the ability to improve alignments by composing matching algorithms. This allows iterative matching: starting with a first alignment, followed by user feedback, subsequent alignment rectification, and so on. A previous alignment can, indeed, be passed to the align method as an argument. The correspondences of this alignment can be incorporated in those of the alignment to be processed.
For instance, it is possible to implement the StrucSubsDistNameAlignment, by first providing a simple substring distance on the property names and then applying a structural distance on classes. The new modular implementation of the algorithm yields the same results.
Moreover, modularizing these matching algorithms offers the opportunity to manipulate the alignment in the middle, for instance, by triming resulting alignments. As an example, the algorithm used above can be obtained by: