[Attempto] Generate ACE sinppets for an OWL class

Kaarel Kaljurand kaljurand at gmail.com
Sun Dec 14 22:19:31 CET 2008


Hi,

On Sat, Dec 13, 2008 at 7:33 PM, Jiang, Guoqian, Ph.D.
<Jiang.Guoqian at mayo.edu> wrote:
>
> I am trying to reuse of your ACE View api to get a set of ACE sentences
> and/or snippets for the axioms of a specific OWLClass in an owl
> ontology.

ACE View is a plug-in for Protege 4.
At this point it's not intended to be used as a stand-alone API.

Within the Protege environment, if you want to see all the snippets
that map to axioms
which reference a certain class, then just select the respective class
and filter out the
snippets in the "Snippets View".

ACE View uses the OWL verbalizer to convert OWL axioms into ACE snippets.
Each axiom is mapped to exactly one snippet (sequence of one or more ACE
sentences). In some cases the mapping fails, then the axiom is "mapped" to
an error message, something like:

/* BUG: axiom too complex */

By default, the verbalizer just produces a plain text output
containing all the resulting
sentences. Using the flag 'html' you get a more structured output, in the form
of an HTML-table where the first column contains the input axioms, and
the second column
the corresponding snippets. Usage example:

./owl_to_ace.exe -owlfile examples/example1.owx -html

It's relatively easy to define your own output format, by changing
'output_results.pl'.
The OWL verbalizer is available here:

http://attempto.ifi.uzh.ch/site/downloads/files/owl_verbalizer-081202_unofficial.zip


> The first question is that, is the source code available for the ACE
> view plugin?

Not yet. I'm planning to release it under LGPL early next year. Let me know if
you need to get the source earlier.


> The second question is that are there some sample codes or
> documentations avaialable  to demonstrate how a set of ACE sentences
> and/or snippets could be generated from the axioms of a specific
> OWLClass through using your ACE view api?

Short answer is that there is no sample code nor documentation.

ACE View does all the verbalization work using the OWL verbalizer.
(Well, actually about 5 more frequent axiom types are verbalized
directly in Java
for performance reasons.)

ACE View uses the OWL verbalizer via the interface provided by the
Attempto Java Packages.
The respective class is described here:

http://attempto.ifi.uzh.ch/site/docs/java/ch/uzh/ifi/attempto/owl/VerbalizerWebservice.html

So, if you want to work entirely in Java and your task is to verbalize
certain axioms as ACE
snippets, then proceed as follows:

1. Learn to use the OWL-API (http://owlapi.sourceforge.net/). Take the
SVN version
because the public version (2.2.0) is out of date with respect to the
version that Protege 4 is using
and that the OWL verbalizer is tested against. The SVN version is very stable.

2. Write a program using the OWL API which:

2.1. Loads your OWL ontology
2.2. Walks over all the axioms that the ontology contains
2.3. If an axiom references your class then places it into a fresh ontology
2.4. Serializes this ontology as OWL 2 XML
2.5. Sends the serialization to the OWL verbalizer webservice
2.6. Gets back the ACE snippet and does something with it
2.7. Goes to step 2.3 until done.

Let me know if I misunderstood something.

--
kaarel



More information about the attempto mailing list