How to define rules(facts) using Problog Python
smejkka3 opened this issue · comments
Hi,
I'm trying to implement bellow rules in problog python package:
As a simple example of rdfs11 I can use:
(John SUBCLASS student) (student SUBCLASS person) -> (John SUBCLASS person)
with arbitrary defined probabilities on the first and second SUBCLASS rules (facts).
Currently I'm struggling to define any of these so I'm not even sure if it possible in Problog.
Thanks in advance
Would a rule like this suffice?
subclass(X,Y) :- subclass(X,Z), subclass(Z,Y).
Thanks, I was able to generalise it for the rest of the rules
Hi,
is it possible to create rule like this?
triple(estonia, subclass, europianunion).
triple(europianunion, subclass, europe).
triple(X,subclass,Z) :- triple(X,subclass,Y), triple(Y,subclass,Z)
the problog doesn't seem to know how to parse this?
Hi,
is it possible to create rule like this?
triple(estonia, subclass, europianunion). triple(europianunion, subclass, europe).
triple(X,subclass,Z) :- triple(X,subclass,Y), triple(Y,subclass,Z)
the problog doesn't seem to know how to parse this?
Are you sure you're not just missing the dot at the end of the rule? Seems to work fine for me otherwise:
https://dtai.cs.kuleuven.be/problog/editor.html#task=prob&hash=d83e894c00d3696f609d934c658db24f