We develop an alignment toolkit for OWL by:
An extensive presentation of the alignment API can be found here.
The simplest way to use ontoalign is to get the following zipfile. It contains all the soources, compiled library, OWL API library.
The very last version of ontoalign can be fetched from the CVS source tree. Just do the following:
$ cvs -d :pserver:cvs@cvs-sop.inria.fr:/CVS/exmosoft login <ENTER return when asked for the password> $ cvs -d :pserver:cvs@cvs-sop.inria.fr:/CVS/exmosoft checkout ontoalign... and you are done. Note that you will have to fetch separately the OWL-API.
If you have improved ontoalign and want this to be included in the source tree and want to have a CVS account for that, please contact Jerome . Euzenat (À) inrialpes . fr.
Once provided with a password you will be able to check out from and commit in our repository through:
$ export CVS_RSH=`which ssh` $ cvs -d :ext:<loginname>@cvs-sop.inria.fr:/CVS/exmosoft checkout ontoalign(If you are not familliar with SSH, it is useful to spend half an hour to know how to avoid to be asked your password anytime). If you are not familiar with CVS, its is time to document yourself.
They are provided here.
"Installing" is really straightforward.
Whatever your mode of getting ontolign you will get an ontoalign directory containing the following subdirectories:
For using you will need Java
runtime environment (tested in 1.4.1) and the OWL-API binary distribution (this is
included in the above zip file).
Note that OWL-API needs log4j and getopt packages, but these are
included in the binary distribution of the OWL API.
For extending you will need Java compiler (tested in Java standard edition 1.4.1) and the OWL-API binary distribution (this is included in the above zip file).
For developing (compiling) you will need Java compiler (tested in Java standard edition 1.4.1) and the OWL-API binary distribution (which is not included in the CVS repositories). It is also very usefull to have Ant.
A good way of setting your environment (from the CVS archive) for developing is to unzip the OWL-API binary distribution and put the files in the ontoalign directories:
$ unzip owlapi-bin-03-10-15.zip $ mv owl/lib/* lib $ ant jar $ mv owl/javadoc/* javadoc $ ant javadoc $ rm -rf owl
Generating the lib/procalign.jar file can be done by launching:
$ ant jar
An extensive presentation of the alignment API can be found here. It documents use and extension of the API.
For demonstrating the use of the API, we implement it and use it through a particular processor (fr.inrialpes.exmo.align.util.Procalign) which:
$ java -jar lib/procalign.jar usage: Procalign [options] URI1 URI2 options are: --impl=className -i classname Use the given alignment implementation. --renderer=className -r className Specifies the alignment renderer --output=filename -o filename Output the alignment in filename --alignment=filename -a filename Start from an XML alignment file --threshold=double -t double Filters the similarities under threshold --debug[=n] -d [n] Report debug info at level n --help -h Print this messageor ($CWD is the current directory)
$ java -jar lib/procalign.jar file://localhost$CWD/rdf/onto1.owl file://localhost$CWD/rdf/onto2.owlAdditionaly a number of options are, or will be, available:
The OWL-API is extended with the (org.semanticweb.owl.align) package. Which describes the Alignment API. This API is, in turns, an "implementation" of the Alignment format.
It is basically made of three interfaces:
More information about the attributes of these classes can be found in the format description.
Addtionnally, there is an AlignmentProcess interface which contains a method for calling a particular alignment method (it is a sub-interface of Alignment) and an AlignmentException.
A (default) impplementation of this API can be found in the fr.inrialpes.exmo.align.impl package.
Adding new alignments methods amounts to create a new AlignmentProcess class implementing the interface. Generally, this can extend the proposed fr.inrialpes.exmo.align.impl.BasicAlignment class and implement AlignmentProcess.
The BasicAlignment has the good taste of defining the storage sructures for ontologies and alignment specification as well as the methods for dealing with alignment display. The only method it does not implement is alignment itself. All methods can be refined (no one is final).
The ClassNameEqAlignment class extends the BasicAlignment by aligning classes bearing the exact same name (NameEqAlignment does the same for properties and individuals).
A more elaborate implementation is the EditDistNameAlignment class which uses an edit distance on class names. It thus have to build a matrix of distance and to choose the alignment from the distance. It can be called by:
$ java -jar lib/procalign.jar file://localhost$CWD/rdf/onto1.owl file://localhost$CWD/rdf/onto2.owl -i fr.inrialpes.exmo.align.impl.method.EditDistNameAlignmentwhich returns:
<?xml version='1.0' encoding='utf-8' standalone='no'?> <!DOCTYPE rdf:RDF SYSTEM "align.dtd"> <rdf:RDF xmlns='http://knowledgeweb.semanticweb.org/heterogeneity/alignment'> <Alignment> <xml>yes</xml> <level>0</level> <type>11</type> <onto1>file://localhost$CWD/rdf/onto1.owl</onto1> <onto2>file://localhost$CWD/rdf/onto2.owl</onto2> <map> <Cell> <entity1 rdf:resource='http://www.example.org/ontology1#reviewedarticle'/> <entity2 rdf:resource='http://www.example.org/ontology2#article'/> <measure rdf:datatype='xsd:float'>0.5333333333333333</measure> <relation>=</relation> </Cell> <Cell> <entity1 rdf:resource='http://www.example.org/ontology1#journalarticle'/> <entity2 rdf:resource='http://www.example.org/ontology2#journalarticle'/> <measure rdf:datatype='xsd:float'>0.0</measure> <relation>=</relation> </Cell> </map> </Alignment> </rdf:RDF>