Vulcan/SystemPrototype/SampleIO
From Knowitall
Overview
This page contains the MLN program (in its full detail), the evidence used and the input/output from Tuffy for the examples.
- MLN Program -- Predicate definition and rules used.
//*************************** //Tuple Predicates //*************************** Arg(tuple, position, phrase!) Rel(tuple, position, phrase!) BinaryTuple(tuple, phrase, phrase, phrase) Nested(tuple, phrase, phrase, phrase) //NestedTuple(tuple, phrase, phrase, phrase, phrase, phrase, phrase) //NestedTuple(tuple, arg1, rel1, arg2, arg3, rel2, arg4) //*************************** //Taxonomic and linguistic predicates //*************************** //Evidence predicates *Stem(phrase, phrase) *Syn(phrase, phrase) *ModifierDropped(phrase, phrase) *ISA(phrase, phrase) //Inferred predicates Type(phrase, phrase) SameAs(phrase, phrase) //************************ //Logical inference rules //************************ //Type transitivity. ISA(x, y) => Type(x, y) . Type(x, y), Type(y, z) => Type(x, z) . SameAs(x, y), SameAs(y, z) => SameAs(x, z) . //Deductive: e.g. If a type of actors does something then a single actor of the type also does it. 100 Arg(t, p, a1), Type(x, a1) => Arg(t, p, x) //Abductive: e.g. If an actor does something then it is possible that other actors of the type also do it. //0.001 Arg(t, p, a1), Type(a1, x) => Arg(t, p, x) Arg(t, p, a), SameAs(a, b) => Arg(t, p, b) . Rel(t, p, a), SameAs(a, b) => Rel(t, p, b) . //************************ // Domain rules //************************ //iron nail specific rule 100 BinaryTuple(t, a1, "composed of", a2), BinaryTuple(t1, a3, r, a4) => BinaryTuple(t1, a1, r, a4) //Growth specific rule 100 Rel(t, 1, x), Rel(t, 2, y) => Rel(t, 1, "causes") //Fox specific rules 10 Arg(t, p, l1), [l1 = "something"] => Arg(t, p, l2) //Deductive inverse. //0.0001 Arg(t, p, l1), [l1 != "something"] => Arg(t, p, "something") //************************ // Textual entailment rules // -- Stemming, Synonyms. //************************ Syn(x, y) => SameAs(x, y) . Syn(y, x) => SameAs(x, y) . 100 ModifierDropped(x, y) => SameAs(x, y) 10 ModifierDropped(x, y) => SameAs(y, x) 100 Stem(x, y) => SameAs(x, y) 10 Stem(x, y) => SameAs(y, x) 0.8 Rel(t, p, "is necessary for") => Rel(t, p, "helps") //************************ //Tuple generation rules. // -- To score tuples via // their component scores. //************************ 10 Arg(t, a, b), Rel(t, c, d), Arg(t, e, f), [a = 1 AND c = 1 AND e = 2 AND b != c AND d != f AND b != d] => BinaryTuple(t, b, d, f) 10 Arg(t, p1, a3), Rel(t, p2, r), Arg(t, p3, a4), [p1 = 3 AND p2 = 2 AND p3 = 4 AND a3 != r AND a4 != a3 AND a4 != r] => Nested(t, a3, r, a4)