Extension of the domain of relations (closed)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Extension of the domain of relations (closed)

William
This post was updated on .
Hi~

Is it meaningful to define relations as follows, with two '>>'s? It is convenient to extend the domain/range of relations, esp. in dynamic way.

with society:
    class Person(Thing):
        pass

    class Cat(Thing):
        pass

    class Dog(Thing):
        pass

    class love_(Dog >> Cat, Person >> Person):
        pass

    class love(Cat >> Dog, Person >> Person):
        inverse_property = love_

    p = Person('p')
    c = Cat('c')
    d=Dog('d')
 
    c.love.append(p)

close_world(society)
sync_reasoner(debug=0)

Reply | Threaded
Open this post in threaded view
|

Re: Extension of the domain of relations

Jiba
Administrator
Hi,

No, you cannot put more than one "A >> B" syntax (I think only the last one will be used).

By the way, be cautious with multiple domains or ranges: when more than one domain/range is defined, OWL considers the INTERSECTION of the domains/ranges (and not the union, as you probably expect).

Jiba