Alignment API: test generation framework

The Alignment API implementation offers facilities to automatically generate data test sets that can be used for evaluating alignments.

These facilities works only on OWL ontologies and are dependent on the Jena API (which is included in the API lib directory).

It allows for generating altered ontologies from a seed ontology and generating the reference alignment between the two ontologies).

Using predefined alterators

Alterators are simple classes, implementing the Alterator interface

The available predefined alterators are:

Benchmark generator

The BenchmarkGenerator class is an example of a whole test set defined at once. It combines various alterators in a specified way. This can be applied to any seed ontology (that Jena is able to parse). It can be invoked from the command line through:

$ java -Xmx1200m -cp $JAVALIB/procalign.jar fr.inrialpes.exmo.align.cli.TestGen -m generateBenchmark -u outputurl -o outputdir -i seedontology

Designing a whole test set

Designing a whole test set can be achived as it is done for Benchmarks, by instantiating the TestSet class and creating a hierarchy of tests (each one built from another; but this can be achieved by having all tests generated from the init ontology).

Adaptive benchmark generator

Not available yet.

Hidden ontology generator

Not available yet.

Ontology network alterators

Creating a simple test

Extending the test generation framework

The test framework is based on the notion of Alterator instances of the fr.inrialpes.exmo.align.gen.Alterator. An alterator, takes as input an ontology (Jena OntModel) and an alignment (Alignment) and generates an altered ontology and alignment.

So its interface is : /** * An abstract test generator which takes as input an ontology and an * alignment between this ontology and another one and transform the * ontology and the alignment accordingly to a type of alteration. * * It follows a particular lifecycle */ public interface Alterator { /** * It is created either: * - from a seed ontology and generate the alignment between this * ontology itself * - from a previous alterator from which it will take the output * ontology and alignment as input. */ //public Alterator( Alterator om ); /** * the namespace of the input ontology */ public String getNamespace(); /** * the namespace of the source ontology in the input alignment */ public String getBase(); /** * modify applies the alteration to the input (the results are kept in * internal structures. */ public Alterator modify( Properties params ); // Temporary /** * getProtoAlignment, getProtoOntology, getHierarchy * are used for accessing these internal structure at creation time. */ public Properties getProtoAlignment(); public OntModel getProtoOntology(); public ClassHierarchy getHierarchy(); /** * Modifies the namespaces of source and target ontologies * (for the main purpose of outputing them) */ public void relocateTest( String namespace1, String namespace2 ); public void relocateTest( String namespace2 ); /** * Returns the altered Alignment and Ontology in output form */ public Alignment getAlignment(); public OntModel getModifiedOntology();

Most of the functions of alterators are available in the BasicAlterator, so that creating a new alterator requires only to write the modify( Properties ) method if it extends BasicAlterator.


http://alignapi.gforge.inria.fr/testgen.html

$Id$