Hi,
I'm quite new to the owlready 2. I encouter the following issue.
I would like to use differentFrom in a rule. However, it behaves strange. The reasoner seems not to execute the rule since no relations are added. I would expect that the reasoner would add a 'is_also_person_as' between John and Jane and between Jane en John. If you remove the differentFrom form the rule or replace it by sameAs it behaves like expected.
Is there anyone who can help me? I'm using version owlready2 0.47. Thank you very much!
Below you find a piece of code to illustrate my question.
from owlready2 import *
onto = get_ontology("
http://test.org/onto.owl")
set_log_level(9)
with onto:
class Person(Thing): pass
class is_also_person_as(Person >> Person): pass
rule = Imp()
rule.set_as_rule("Person(?x) ^ Person(?y) ^ differentFrom(?x,?y)-> is_also_person_as(?x, ?y)")
set_log_level(0)
John = Person("John")
Jane = Person("Jane")
with onto:
sync_reasoner(infer_property_values=True, debug=2)