On 25/07/17 00:17, javed khan wrote:
If we have a rule which says:

If a player has less than 10 goals, he is average player and if the goals
exceed 10, he is a star player . Player A is first an average player but
later when his goals cross the digit 10, he is a star player but the
problem is it still shows the the player in average class.

I know rules are non monotonic, but is there any way in which we can (in
one way or other) replace the old data with existing when the rule fires?
If there is no way, it means we should not use rules but a simple if/then
rules?

Depends on how you are representing goals and how you are updating the goal count.

If you are representing goals as individual distinct events and then using rules to do the counting then that is indeed non-monotonic and while Jena rules can be used for counting it's a pain. Just as easy to write a SPARQL update query and e.g. put the result in a separate graph.

If you are representing your goals as a single predicate "numberOfGoals" and you do updates by removing the old assertion and add a new assertion then the rules are fine. In that case the rule is monotonic it's your data management that is doing the retraction so the rule system (either of them) will ditch any previous results when it sees the retract.

Dave

Reply via email to