[Attempto] How to define OWL datatype properties ?

Kaarel Kaljurand kaljurand at gmail.com
Mon Apr 30 12:17:46 CEST 2012


Hi,

On Thu, Apr 26, 2012 at 17:45, Jean-Marc Vanel <jeanmarc.vanel at gmail.com> wrote:
>
> 2012/4/14 Kaarel Kaljurand <kaljurand at gmail.com>
>>
>> On Thu, Apr 12, 2012 at 14:54, Jean-Marc Vanel <jeanmarc.vanel at gmail.com>
>> wrote:
>
> I tried this expression that both expresses waht I wads searching, and
> actually works (with the git version ) :
>
> ./ape.exe -text 'If X v:has-a-name Y then Y is a n:xsd_string.' -solo
> owlfsspp
> Prefix(:=<http://attempto.ifi.uzh.ch/ontologies/owlswrl/test#>)
> Ontology(<http://attempto.ifi.uzh.ch/ontologies/owlswrl/test>
>    ObjectPropertyRange(
>       :has-a-name
>       :xsd_string
>    )
> )
>
> And this nicely brings me to the next question I planed to ask (I asked it
> before, but nothing happened AFAIK ).
> What is the best practice for refering to OWL classes and properties in
> another RDF namespace ?

ACE/DRS doesn't have a notion of namespaces, i.e. you have to use
different names for different things, e.g.

  John-1 knows John-2.

The DRS that you obtain when parsing this sentence has the form:

  [A]
  predicate(A, term1 ,named( term2 ),named( term3 ))-1/2

where term2 and term3 are the logical representations of 'John-1' and
'John-2' as given by the lexicon.

The ACE->OWL/SWRL translator supports a convention that lets you
specify the full IRI of an entity, e.g.:

ape.exe \
-uri "http://www.example.com/default" \
-noclex \
-ulextext "pn_sg('Mary', iri('http://www.example.com/names#Mary'),
fem). noun_sg(man, man, masc). tv_finsg(likes, like)." \
-text "Every man likes Mary." \
-solo owlfsspp

results in:

Prefix(:=<http://www.example.com/default#>)
Ontology(<http://www.example.com/default>
    SubClassOf(
        :man
        ObjectSomeValuesFrom(
            :like
            ObjectOneOf(
                <http://www.example.com/names#Mary>
            )
        )
    )
)

So, in terms of tools, the building blocks are there, but you cannot
rely on an ACE language construct to get namespaces support. Instead
your application must maintain a lexicon that specifies the full IRIs
for all tokens and use it when communicating with the ACE parser.

> I this particular case, I want to obtain directly ( no hacking and regular
> expressions ) :
>
> ObjectPropertyRange(
>       :has-a-name
>       xsd:string
>  )

Well, you cannot have a string as an object property range, so some
form of term rewriting into a data property construct is needed. And I
agree that regular expressions are a bad tool for such a rewriting. I
guess that ACE->OWL/SWRL could perform this rewriting (given that it
knows for sure that the argument is an XSD datatype).

Best regards,
Kaarel


More information about the attempto mailing list