Thursday, January 14, 2010

Mapping OWL ontologies into PERL

Unlike in JAVA, there doesn't exist a way in PERL to generate modules from Web Ontologies (OWL). Well, not until recently!

As part of a bigger effort, the CPAN module, SADI, contains a script for generating fully functional PERL modules from Web Ontologies. The script is called sadi-generate-datatypes.pl and is automatically installed along side the SADI module. Under the hood it is using RDF/OWL parsing code from PLUTO (a module built on from a project from IBM).

 I wont go into the details for how to use this module here (there is ample documentation available on CPAN for this module). I would like to point the interested reader to the documentation for generating the Perl modules. Go to http://search.cpan.org/dist/SADI/ and at the very bottom you will see under the "Other Files" header a link called doc/working_with_datatypes.html. That file should get you going.

1 comment:

Ed said...

Functionality is now hosted on CPAN

To get started:

1. Install the module as you do other modules.
2. Run the script (available on your path) owl2perl-install.pl
3. Finally, generate modules using owl2perl-generate-modules.pl

On windows, omit the '.pl' portion of the script