Quick start with the Alignment API in Java
This is the very basic for starting with the Alignment API and
checking that everything should be fine.
Another quick start guide exists for the Alignment server.
We also have an on-line tutorial on using the
Alignment API and more systematic documentation.
Fetching the Alignment API and starting
Requirements
For using you will need a Java
runtime environment (tested in 1.6). All other necessary
libraries are available in the archive (see the list of libraries).
Fetching the ZIP'ed version
The simplest way to use the Alignment API is to get the lastest release
zipfile from the site http://gforge.inria.fr/frs/?group_id=117. It contains all the sources, compiled
library, required libraries.
Running
Running the program is achieved through:
$ java -jar lib/procalign.jar
Two URIs required
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
--params=filename -p filename Reads parameters from filename
--alignment=filename -a filename Start from an XML alignment file
--threshold=double -t double Filters the similarities under threshold
--cutmethod=hard|perc|prop|best|span -T hard|perc|prop|best|span method for computing the threshold
--debug[=n] -d [n] Report debug info at level n
-Dparam=value Set parameter
--help -h Print this message
Alignment API implementation 3.2 ($Id$)
Congratulations, you are done. We
invite you to learn more by using the tutorial
and the documentation.
Details below are for developing with the Alignment API.
Package content
Whatever your mode of getting the Alignment API you will get an alignapi
directory containing the following subdirectories:
- README.TXT instructions for starting with the Alignment API
- README.AServ instructions for setting up an Alignment Server
- LICENSE.TXT the terms under which the software is licensed to you.
- build.xml: ant file to compile and generate jar-files.
- dtd: the align.dtd and align.owl alignment specification;
- lib: contains align.jar, ontowrap.jar, procalign.jar, alignsvc.jar
and other necessary jarfiles;
- html: documentation
- html/tutorial: a tutorial on using the API
- distrib: contains a few files for building the distribution
- classes: the compiled classes (in the zip file, the classes are
included)
- examples: some examples of use of the API and the Server.
- javadoc: generated javadoc (in the zip file the doc are
pregenerated);
- test: unit tests for testng;
- tools: some tools that may be used for engineering the API;
- src: source classes:
- org.semanticweb.owl.align: the API
- fr.inrialpes.exmo.ontowrap: ontology API wrappers
- fr.inrialpes.exmo.align.impl: basic implementation
- fr.inrialpes.exmo.align.cli: command-line interface
- fr.inrialpes.exmo.align.util: utility wrapper functions
- fr.inrialpes.exmo.align.ling: WordNet-based implementation
- fr.inrialpes.exmo.align.parser: Alignment format parsers
- fr.inrialpes.exmo.align.service: Alignment Server
- fr.inrialpes.exmo.align.gen: test generators
Developing with the Alignement API
Requirements
For extending you will need a Java compiler (tested in Java
standard edition 1.6). Other libraries are included. It is also very usefull to have Ant.
Compilation and use
Generating the jar-files corresponding to the Alignment API can
be achieved by launching:
$ ant jar
This recompiles the necessary files.
Only compiling the necessary files is obtained by:
$ ant compile
Recompiling all files is achieved by:
$ ant compileall
Executing the tests:
$ ant test
Checking all java warnings and other static analysis tools:
$ ant lint
Clean up what has been generated:
$ ant clean
Other options may be obtained by ant usage or through
inspecting the build.xml file.
Typical development with the API
We can distinguish four types of developments in the API:
- Developing the API: modifying the code of the API for adding
functions or fixing bugs;
- Extending the API: creating new instances of the API interface
(new alignment methods, new renderers, new server plug-ins, etc.);
- Embedding the API: creating an application using the API which
directly embedded the API libraries and invoke them;
- Using the API as a server: creating an application using the API
which communicates loosely with an instance of Alignment Server.
In theory, only the first aspect requires recompiling and modifying
the Alignment API code. However, it may be useful for other aspects (for
instance for debugging).
Documentation
Most documentation is available from here.
An exception is the javadoc which
is only available on your local machine. It can be recompiled by:
$ ant javadoc
http://alignapi.gforge.inria.fr/align.html
$Id$