Tutorial given at ISWC 2014
Riva del Garda (Italy), October 19th, morning, 2014
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.
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:
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 See http://alignapi.gforge.inria.fr/logging.html -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.
Here are some details on what the archive contains (the important things):
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.
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:
We may even concentrate specifically on the relations between ontologies: dog.owl, cose.owl and energyresource.owl.
This tutorial is loosely based/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):
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.