SWRL and Rolification cannot return what I want

后端 未结 1 1353
无人及你
无人及你 2021-01-24 04:16

I have developed an ontology and I want to add the following SWRL in protege:

Divider_intersection(?node), is_extent_of(?node, ?s), builds(?s, ?l),Segment(?s),La         


        
1条回答
  •  走了就别回头了
    2021-01-24 04:31

    Your approach works, and without seeing your ontology (your link requires permissions, and offsite links aren't very helpful anyhow) we can't see why your particular construction of it works. One thing that jumps out from your question is that the it looks like your is_divided_at property has its arguments (?d,?node) in the opposite order from what the property chain axiom would produce. Anyhow, here's a working example.

    screenshot in protege

    @prefix :       .
    @prefix ex:     .
    @prefix rdf:    .
    @prefix owl:    .
    @prefix xsd:    .
    @prefix rdfs:   .
    
    ex:isDividedAt  a               owl:ObjectProperty ;
            owl:propertyChainAxiom  ( ex:_DividerIntersection ex:isExtentOf ex:_Segment ex:builds ex:_Lane ex:builds ex:_DetailedPartition ) .
    
    ex:Segment  a                owl:Class ;
            owl:equivalentClass  [ a               owl:Restriction ;
                                   owl:hasSelf     true ;
                                   owl:onProperty  ex:_Segment
                                 ] .
    
    ex:_DetailedPartition
            a       owl:ObjectProperty .
    
    ex:DividerIntersection
            a                    owl:Class ;
            owl:equivalentClass  [ a               owl:Restriction ;
                                   owl:hasSelf     true ;
                                   owl:onProperty  ex:_DividerIntersection
                                 ] .
    
    ex:_Segment  a  owl:ObjectProperty .
    
    ex:_Lane  a     owl:ObjectProperty .
    
    ex:builds  a    owl:ObjectProperty .
    
    ex:dividerIntersection0
            a              owl:NamedIndividual , ex:DividerIntersection ;
            ex:isExtentOf  ex:segment0 .
    
      a    owl:Ontology .
    
    ex:detailedPartition0
            a       owl:NamedIndividual , ex:DetailedPartition .
    
    ex:_DividerIntersection
            a       owl:ObjectProperty .
    
    ex:segment0  a     owl:NamedIndividual , ex:Segment ;
            ex:builds  ex:lane0 .
    
    ex:DetailedPartition  a      owl:Class ;
            owl:equivalentClass  [ a               owl:Restriction ;
                                   owl:hasSelf     true ;
                                   owl:onProperty  ex:_DetailedPartition
                                 ] .
    
    ex:isExtentOf  a  owl:ObjectProperty .
    
    ex:lane0  a        owl:NamedIndividual , ex:Lane ;
            ex:builds  ex:detailedPartition0 .
    
    ex:Lane  a                   owl:Class ;
            owl:equivalentClass  [ a               owl:Restriction ;
                                   owl:hasSelf     true ;
                                   owl:onProperty  ex:_Lane
                                 ] .
    

    0 讨论(0)
提交回复
热议问题