Search code examples
rdfowlsemantic-webprotegerdfs

How do i describe "John swims" in OWL with Protege?


i've found a web page that explain different between relations.

https://www.w3.org/2004/08/12-Yoshio/onNaryRelations.html#unary

but that missing part of code, i can't make any of them work.

how possible to make it works like "John swims"?


Solution

  • Important note: your link does not show actual RDF. As stated in the abstract of the page:

    This page presents my (ongoing) proposal for a framework for presenting N-ary relationships.

    Instead, my answer will show you how to define the necessary classes and properties to express what you are trying to.


    RDF only allows to define statements, or triples, with a subject, a predicate and an object.

    <subject> <predicate> <object>
            I        like hamburgers
         John          is swimming
    

    An important predicate is rdf:type (often shortened to a in Turtle files, such as the one your links shows), which indicates that an individual is an instance of a certain class. To read it in actual English, you can use "is a".

    <subject> <predicate> <object>
            I        am a Person
         John        is a Person
     Swimming       is an Activity
    

    Last but not least, in order to express that a Person performs an activity, we need to define an object property, performs, which has Person as a domain and Activity as a range.

    In this Gist, you'll find a Turtle file that you can open in Protégé. The important line here is line 40, where the actual John performs Swimming statement is defined.