[Attempto] Using ACE to create SWRL rules

Kaarel Kaljurand kaljurand at gmail.com
Fri May 13 13:32:44 CEST 2011


Hi,

On Thu, May 12, 2011 at 22:39, Dilvan Moreira <dilvan at gmail.com> wrote:
> On Thu, May 12, 2011 at 10:28 AM, Kaarel Kaljurand <kaljurand at gmail.com>
> wrote:
>>
>> On Wed, May 11, 2011 at 21:35, Dilvan Moreira <dilvan at icmc.usp.br> wrote:
>>
>> This ontology is loaded/verbalized in 40 seconds on my humble i3 with
>> 4 GB of RAM. Of course, you need to have have the OWL verbalizer
>> installed locally, otherwise it could be very slow. Could this be the
>> problem?
>
>    I am not using a local OWL verbalizer so it takes some time for the tab
> to show something.

The services running on the Attempto server (ACE parser, OWL
verbalizer, etc.) are there only for demonstration purposes. The
server is quite old and slow. ACE View can verbalize some simple and
frequently occurring axioms (e.g. SubClassOf with named classes) in
Java so often the OWL verbalizer service is not used, but in general
if you want to verbalize large amounts of axioms (with complex
structure) then better install the verbalizer locally.

> It seems that the ACE View tab only shows the active
> ontology not all loaded (regardless of the setup in the View menu).

Yes, that's true, the "Show ..." radiobuttons in the View-menu are
ignored and all the ACE views behave as if "Show only the active
ontology" is selected. There should probably be a warning message if
an unsupported menu option is chosen.

> If I
> choose autism-ontology I can see the class definitions in ACE.
>    The ACE Text is showing the rdf:ID of the classes (even if the View menu
> is set "Render by label"), can I change it to show the rdf:label of classes?

Yes there are currently some limitations related to this.

The basic idea is that the content words in ACE snippets are based on
the annotation properties CN_sg, CN_pl, TV_sg, etc., where e.g. CN_pl
means "common noun in plural". When you create e.g. a new class then
it is considered to be a noun and the properties CN_sg and CN_pl are
automatically generated. The input to this morphological generation is
the _rendering_ of the class. If the rendering is based on the label
then the singular and plural forms are generated from the label. This
is the intention, but there seems to be a bug, because now that I
tried, the rendering was ignored and the morph. forms were generated
based on the class name.

A current limitation is also that once an ACE snippet is generated it
will not change anymore, even if you change the rendering preference
or edit the morphological forms. I would like to get this fixed but it
requires some fundamental changes.

>    Would it be too difficult to add SWRL built-ins? Can you point us to the
> relevant docs?

The currently supported built-ins are: equal, notEqual, lessThan, add,
subtract, multiply, divide, stringConcat. The next version of APE
adds: lessThanOrEqual, greaterThan, greaterThanOrEqual.
I think no more built-ins can be added because the remaining SWRL
built-ins do not have a counterpart in ACE, e.g. ACE does not have a
built-in like swrlb:cos. One can of course use ACE to talk about
cosines, e.g.

(1) The cosine of Pi is -1.

but the DRSs obtained from such sentences are not handled by the
DRS->SWRL converter.

DRS->SWRL is part of APE, see the source in
"ape/utils/owlswrl/implication_to_swrl.pl". There are no other docs I
think.

>> ACE View _does not_ support translating SWRL rules into ACE. It would
>> be nice to have this feature but at the moment there are no plans to
>> add this.
>
>    Just to make it clear:
>
> It's possible to translate ACE to OWL/SWRL and OWL to ACE
> It's NOT possible to translate OWL/SWRL to ACE

Yes. Just to make it more clear, there are converters:

ACE -> DRS
DRS -> OWL/SWRL (tries to generate OWL, if this fails then tries to
generate SWRL)
OWL -> ACE
DRS -> ACE

By chaining these converters we can build:

ACE -> OWL/SWRL
ACE -> ACE (paraphraser)

>    Is it in your plans to add OWL/SWRL to ACE translation? Is it too
> difficult (it seems to me that the opposite would be more difficult)?

It's in the plans, but I really don't know when I can start working on
it. My plan is to convert SWRL into DRS for which there already exists
a verbalizer (DRS -> ACE).

>    When we show the classes using labels they have better names. But you are
> right, we would have to change the built-in names prior to convert to ACE
> (or create nicer rdf:label to them).
>
>> ADI-2003(?a), ADI_2003_funccom_cinsges(?a, ?score),
>> ADI_2003_interview_date(?a, ?date), SubjectKey(?a, ?subjectID),
>> createOWLThing(?phenorecord, ?qv), createOWLThing(?phenorecord,
>> ?subjectID) -> 'Phenotype record'(?phenorecord), 'Quantitative
>> value'(?qv), subject_has_quality_or_disposition(?phenorecord, 'Current
>> conventional or instrumental gestures phenotype'),
>> hasValidTime(?phenorecord, ?date), 'has measurement'(?phenorecord,
>> ?qv), 'has value'(?qv, ?score), 'is derived from'(?phenorecord,
>> "MeasureCurrentConventionalGestures"^^string), subjectId(?phenorecord,
>> ?subjectID)

I think this rendering does use labels, e.g. 'Phenotype record' is the
label of AUTISMC100000.

Best regards,
Kaarel


More information about the attempto mailing list