I'm using AllegroGraph to store statement like this:
<newsid1 hasAnnotation Gamma>
<newsid1 hasAnnotation Beta>
I would like to define a rule on this staments that says: if the subject newsid1 hasAnnotation
either Gamma
or Beta
, then add a new statement in the triplestore that says that the subject hasAnnotation Theta
, i.e. the statement
<newsid1 hasAnnotation Theta>
My questions are the following:
- How I can define such a rule for Allegro?
- How can I apply these rules over the statements?
1) You can define use Prolog functors to define these rules. In your case you will define.
2) Run then the following prolog query (using the AGview for exemple) to add these news statements
You can read the following documents to understand this code :