vs.plotagent.inspiration
Class BasicRuleBuilder
java.lang.Object
vs.plotagent.inspiration.RuleBuilder
vs.plotagent.inspiration.BasicRuleBuilder
public class BasicRuleBuilder
- extends RuleBuilder
Basic implementation of the RuleBuilder.
It will look at the causal chains of the fabula and build rules of them, on the following principles:
(1) if there is A and B, and A causes B, then you can make a rule:
IF A, THEN B /\ A causes B
(2) if there is A1..An and B, and A1..An cause B, then you can make a rule:
IF A1 /\ A2 /\ .. /\ An, THEN B /\ A1 causes B /\ A2 causes B /\ ... /\ An causes B
(3) if there is a causal chain leading up to A, and A causes B, then you can make a rule containing the
whole causality information leading up to A:
IF .. /\ .. /\ .. causes A, THEN B and A causes B
- Author:
- swartjes
Field Summary |
static java.lang.String[] |
causalLinks
The URIs of the predicates considered to be causal links, according to the Fabula ontology. |
Constructor Summary |
BasicRuleBuilder(de.fuberlin.wiwiss.ng4j.NamedGraphSet ngs)
Constructor |
Method Summary |
java.util.Set<InspirationRule> |
build()
Builds the rules, outputs them in Prolog format and returns them as a String. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
causalLinks
public static java.lang.String[] causalLinks
- The URIs of the predicates considered to be causal links, according to the Fabula ontology.
BasicRuleBuilder
public BasicRuleBuilder(de.fuberlin.wiwiss.ng4j.NamedGraphSet ngs)
- Constructor
- Parameters:
ngs
- the NamedGraphSet containing the source case from which to build rules.
build
public java.util.Set<InspirationRule> build()
- Description copied from class:
RuleBuilder
- Builds the rules, outputs them in Prolog format and returns them as a String.
- Specified by:
build
in class RuleBuilder
- Returns:
- a String containing a collection of rules in Prolog format.