DAML+OIL to OWL ConversionHome | About DAML | Announcements | Roadmap | Site Search
At the DAML PI meeting in April, program manager Murry Burke asked all principal investigators to convert their projects and Ontologies from DAML+OIL to OWL. At BBN we have a number of tools and Ontologies developed for the DAML program and hosted on www.daml.org. This document records our experiences and some lessons learned in the conversion to OWL.
BBN has updated the OWL conversion script from MindSwap.org to include more changes and to work with a larger variety of input files. We tested it by converting all the DAML+OIL files on http://www.daml.org (about 100 Ontologies and 1100 instance files). By the end of the process the script was able to convert most files completely. The updated OWL Conversion script is available for downloading, and can be run on computers with PERL installed. We also sent a copy to MindSwap.org so they can update the online version.
Items OWL Converter does not handle:
After conversion we used the standalone version of the OWL Validator to validate the ontology and instance files. Based on the results we were able to correct most of the remaining problems by hand.
rdf:niltags, so it will produce parse errors even though the file is correct.
The following figure compares the results of the original OWL Conversion script and the modified OWL Conversion script to the final OWL Ontologies. The counts indicates the number of Ontologies with errors, warnings, or information messages after the conversion process. Files with parse errors were omitted from the remaining counts.
Validate Ontologies before validating artifact/instance/data files. When validating an instance file the OWL Validator will load the referenced Ontologies. If the referenced files contain errors or are not converted to OWL it could produce extra errors.
xml:base attribute in the RDF tag of
your document. This will ensure the resources in the file will
have a constant URI no matter what URI was used to load the file,
including locally cached copies.
For example, [1a] and [1b] are two URLs for the same file. Loading
them into Jena 1.6.1 using those two URLs will produce two different
models (you can view the triples at [2a] and [2b]). In contrast, if
we add an
xml:base attribute to the file and load it into
Jena 1.6.1 using the two different URIs [3a] and [3b] the models are
identical (triples at [4a] and [4b]). You could even save the file
locally on your computer and load it with a 'file:' URL and the URIs
would remain consistent.
The value of
xml:base could even be something
completely different than the URI used to reference the file
although we do not recommend this. It is preferable that the
xml:base be a valid URL that resolves to the file for
reasons of clarity (see additional comments below about the
If you wish to use OWL-DL or OWL-Lite, you can not use special
OWL properties like
rdf:Class. The domain of
owl:Class. Though in OWL Full,
owl:Class are equivalent.
The URI of external Ontologies may change. If the Ontology depends on external Ontologies you may need to track down the OWL version of the ontology. The URI of that ontology may be different than the DAML version. It is also possible the referenced ontology will not be converted to OWL immediately, if at all.
If needed, an
owl:Ontology tag can be used in
instance files. Both ontology and instance files can contain an
owl:Ontology declaration. The
attribute of the
owl:Ontology tag should be the URL used
to reference the file (traditionally
used, which resolves to the base URL for the file). OWL includes a
number of special properties to identify and manage Ontologies.
owl:imports statements for all Ontologies
and instance files that are referenced in the file. This makes the
dependencies on other files explicit. The imported URI should match
the URI used in the
owl:Ontology tag of the imported
file, which should also be a valid URL for loading the file.
If you tool only works on instance files at the RDF level, then the tool probably already works with OWL (with the exception of rdf:datatype attributes).
For some tools it may be sufficient to replace the URIs for DAML+OIL terms with the URIs for the equivalent OWL (or RDF/RDFS) terms. See Appendix D of the OWL Reference for a list of most changes from DAML+OIL to OWL.
You may wish to limit your tool to work with one of the two subsets of the OWL language (OWL Species): OWL Lite or OWL-DL. See the OWL Reference documents for more information on OWL and the OWL Species.
We did not address the use of XML Datatypes in our OWL conversion.
In particular the addition of
rdf:dataype attributes to
statements with literal values. One reason is the lack of support for
rdf:datatype in Jena (version 1.x) and other tools. This
would require a more complex conversion tool that would need to
determine which data type to use based on ontology information,
general heuristics, and human input.
The OWL Conversion script (BBN Modified Version) is available for download.
Requirements and Installation:
owlConverter.pl inFile="file.daml" outFile="file.owl" defaultNs="namespace" defaultBase="base"
inFileis the file to convert.
outFileis where the converted file is saved.
defaultNs(optional) is a new default namespace (
xmlns=") for the file.
defaultBase(optional) is a new default
xml:basefor the file.
owlConverter.pl will convert the inFile from DAML+OIL to OWL and write
the file to outFile. If a defaultNs and/or defaultBase are specified
the new values will be set as attributes in the
rdf:RDF tag. The
converter script will print the number of lines in the input file.
David Rager, Troy Self, and Jeremy Lerner.