Vulcan/SystemPrototype/SampleIO

From Knowitall
Revision as of 19:44, 27 August 2013 by Niranjan (talk | contribs) (Created page with "== 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...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.
10 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.
1 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.
1 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.
//************************
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) .
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) .