Tutorial given at ISWC 2014

Ontology matching tutorial: Hands-on preparation and execution

Jérôme Euzenat (INRIA & Univ. Grenoble-Alpes)
Pavel Shvaiko (Informatica Trentina SpA)

Riva del Garda (Italy), October 19th, morning, 2014

Spirit

The idea is to have an interactive hands-on sessions. There is no truth cast in stone. So be prepared to try new things and to suggest alternatives.

The goal of the hands-on part of the tutorial is to familiarise the attendence with available tools and, in particular, we have the ambition to show that using advanced tools such as reasoners or query mediators generated from alignments is not particularly difficult. It also aims at showing that tools are here and perfectly usable.

The hands-on sessions are essentially run under UNIX command lines (yes Terminal under OS X is OK). It is in fact possible to answer most of these questions under a browser pointing at an Alignment server. But we do not support this option at the moment.

The time devoted to this tutorial is short so, be prepared.

Preparation

The whole tutorial is done in UNIX command line. The second requirement is to have Java available. We will assume that is is available through the java and javac commands. If you really feels unable to do it (for whatever reason), team up with someone else and try to concentrate on what has to be done. Otherwise:

  1. Download the zip file.
  2. Unzip it
  3. cd omtutorial
  4. java -jar lib/procalign.jar
This should answer:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
usage: java fr.inrialpes.exmo.align.cli.Procalign [options] ontoURI ontoURI
            Matches the two ontologies identified by <ontoURI>

Options:
 -a,--alignment <FILE>     Use initial alignment FILE
 -D <NAME=VALUE>           Use value for given property
 -d,--debug <LEVEL>        debug argument is deprecated, use logging instead
 -h,--help                 Print this page
 -i,--impl <CLASS>         Use the given CLASS for matcher
 -o,--output <FILE>        Send output to FILE
 -P,--params <FILE>        Read parameters from FILE
 -r,--renderer <CLASS>     Use the given CLASS for output
 -T,--cutmethod <METHOD>   Method to use for triming (hard|perc|prop|best|span)
 -t,--threshold <DOUBLE>   Trim the alignment with regard to threshold

Alignment API implementation 4.6 (1972M)
Then you can wander around the file in the zip if you want it.

Content of the archive

Here are some details on what the archive contains (the important things):

Some tricks

For those not familiar with UNIX command line, here are some tricks that you could use for being more productive (here for sh/bash).

Setting some variables:

$ CWD=`pwd`
$ LIB=$CWD/lib
$ CLASSPATH=.:$LIB/slf4j/logback-classic-1.0.9.jar:$LIB/slf4j/logback-core-1.0.9.jar:$LIB/procalign.jar:$LIB/jena/jena.jar:$LIB/slf4j/slf4j-api.jar:$LIB/xerces/xercesImpl.jar:$LIB/xerces/xml-apis.jar:$LIB/jena/iri.jar:$LIB/jena/httpcore.jar:$LIB/jena/httpclient.jar:$LIB/cli/commons-cli.jar:$LIB/hermit/hermit.jar:$LIB/owlapi30/owlapi-bin.jar:$LIB/logmap/logmap.jar

Running a matcher:

$ java -cp $CLASSPATH -jar $LIB/procalign.jar -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment file:$CWD/ontologies/cose.owl file:$CWD/ontologies/dog.owl > align.rdf

How many correspondences are there?

$ grep entity1 align.rdf | wc -l

Applying a threshold:

$ java -cp $CLASSPATH fr.inrialpes.exmo.align.cli.ParserPrinter file:align.rdf -t 0.75 > align75.rdf

Many such patterns are available in the README.TXT file of the archive.

Practical 1: methodology

We will try to apply the methodology sketched in our book:

The goal however, will be slightly different from simply matching two ontologies. In this case it is, considering a set of ontologies (provided for your convenience in the onto directory of the zip file), try to find alignments between them and publish them.

The ontologies are real ontologies that may be useful in domains between smartcities and energy efficient buildings. They are available from the catalogue http://smartcity.linkeddata.es/. In order to make the session practicable, we have selected a subset of 10 ontologies available in the ontologies directory.

More precisely, what we want to do here is:

  1. Specify the need;
  2. Assess the ontologies available here;
  3. Look for alignments on the web;
  4. Select those ontologies that we will consider;
  5. Run basic matchers (from the Alignment API);
  6. Assess the results;
  7. Run other matchers (LogMap, Aroma, else);
  8. Assess the results;
  9. Have a manual look to the results and correct them;
  10. Satisfied with the results? Consider publishing them.

We may even concentrate specifically on the relations between ontologies: dog.owl, cose.owl and energyresource.owl.

Practical 2: advanced techniques

This tutorial is loosely based on/connected to Tutorial 4 of the Alignment API.

More precisely, what we want to do here is to use a particular alignment (cose-dog.rdf):

  1. Retrieving an alignment from an alignment server (currently http://al4sc.inrialpes.fr);
  2. Tranforming a query from the alignment (with TransformQuery or the server);
  3. Using the alignment for merging two ontologies (with OWLAxiomsRendererVisitor);
  4. Testing the consistency of merged ontologies (with the omt.TestConsistency class);
  5. Reasoning on the merged ontologies (with the omt.TestSubsumption class);
  6. Repairing an incoherent alignment (with LogMap repair);

Acknowledgements

Thanks to Jérôme David for malking Aroma available, Ernesto Jimenez-Ruiz for making LogMap available, Christian Meilike for making Alcomo available, and all other developers to making their code available.

Thanks to the developers of the ontologies.

The data for this tutorial has been partially elaborated within the Ready4SmartCities project.


http://tutorial.ontologymatching.org/practical/

$Id: index.html,v 1.5 2021/08/27 14:48:17 euzenat Exp $