0

I'm pretty new in the RDF, RDFS and OWL world and I'm trying to build my small ontology structure example.

I've gathered some information about plants, specifically I was thinking of a first partitioning level based on "how tall a plant can be" (please let me pass this phrase, I am doing a very very simple ontology that isn't 100% real world correct, just using it to understand OWL) by dividing a superclass called vegetation in 3 subclasses called herbaceous plant, shrub and tree.

Now those classes differ for the height of the objects in them so I was thinking of making 3 properties (one for each) with the same name: "hasHeight" in which, based on the class they have value certain restriction like (> 6 meters) for trees or (>= 1,5 & <= 6 meters) for shrubs.

The solution I was thinking:

Vegetation
* L Herbaceous plant with property hasHeight (< 1,5m)
* L Shrub with property hasHeight (>= 1,5m & <= 6m)
* L Tree with property hasHeight (> 6m)

I am sure this is not the correct way to approach this problem and wanted some help to understand better how I could structure those information.

The BigBoss
  • 111
  • 2
  • 11
  • First explain why OWL is Web Ontology Language. – nicomp Sep 10 '18 at 20:17
  • 2
    @nicomp somewhat off-topic, but the justification given by the working group is that it's named after the character Owl in A. A. Milne's Winnie the Pooh, who was very wise, and could spell his own name: "WOL". – Jeen Broekstra Sep 11 '18 at 01:02

1 Answers1

1

In the Manchester syntax:

Prefix: : <https://stackoverflow.com/q/52263807#>

Ontology: <https://stackoverflow.com/q/52263807>

Class: Vegetation
#    DisjointUnionOf: Herbaceous_plant, Shrub, Tree

DataProperty: has_height
    Domain: Vegetation
    Range: xsd:decimal[>= 0.0]
    Characteristics: Functional
    Annotations: rdfs:comment "in meters"@en

Class: Herbaceous_plant
    EquivalentTo: # Vegetation and
        has_height exactly 1 xsd:decimal[>= 0.0 , < 1.5]

Class: Shrub
    EquivalentTo: # Vegetation and 
        has_height exactly 1 xsd:decimal[>= 1.5 , <= 6.0]

Class: Tree
    EquivalentTo: # Vegetation and
        has_height exactly 1 xsd:decimal[> 6.0]

Individual: tree1
    Facts: has_height 7.0

# Individual: tree2
#     Types: Tree, Shrub

Open it in Protégé, inspect elements in the Class hierarchy view on the Entities > Classes tab, then select Reasoner > Start reasoner and inspect them again.

In fact, one don't need the lines that commented out in order to:

  • classify tree1 as Tree, or
  • invalidate the ontology (make it inconsistent) by the tree2 individual.
Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
  • thank you so much for the reply, if i could ask, how the things should be changed if i would include the possibility for a "plant" to be instances of 2 of the 3 classes but keeping the same height conditions for the classes?? example: can i state that a laurel plant can be both a **tree** and a **shrub** using this structure? will it result in duplicate entries for the 2 classes? – The BigBoss Sep 11 '18 at 09:09
  • 1
    In general, It is possible for individual to belong to multiple classes (however, not in the above ontology, which is quite rigid in that sense and will be inconsistent in that case. – Stanislav Kralin Sep 11 '18 at 09:27
  • thank you very much for your kind answer and your help sir! – The BigBoss Sep 11 '18 at 09:33