% Copyright (C) 2013 Peter Schueller %schema1. schema2 :- not schema1. nom(g1,n1,sam). nom(g1,n2,drawing). act(g1,n3,hang). mod(g1,n4,above). nom(g1,n5,tina). nom(g1,n6,drawing). nom(g1,n7,entity). act(g1,n8,appear). mod(g1,n9,much_better). mod(g1,n10,with). %mod(g1,n11,another). nom(g1,n12,entity). mod(g1,n13,below) :- schema1. mod(g1,n13,above) :- schema2. dep(g1,d1,n1,n2,@set(poss)). dep(g1,d2,n2,n3,@set(subj)). dep(g1,d3,n4,n3,@set(mod)). dep(g1,d4,n5,n6,@set(poss)). dep(g1,d5,n6,n4,@set(obj)). dep(g1,d6,n7,n8,@set(subj)). dep(g1,d7,d2,d6,@set((meta,elaboration_or_occasion))). dep(g1,d8,n9,n8,@set(mod)). dep(g1,d9,n10,n8,@set(mod)). dep(g1,d10,n12,n10,@set(obj)). %dep(g1,d11,n11,n12,@set(mod)). dep(g1,d12,n13,n12,@set(mod)). dep(g1,d13,n7,n13,@set(obj)). % A14 print("Sam's drawing was hung just above Tina's and it did look much better with another one below it.") :- schema1. print("Sam's drawing was hung just above Tina's and it did look much better with another one above it.") :- schema2. % either n2 = n7 or n6 = n7 required_equivalence(g1,eq1,n2,n7). required_equivalence(g1,eq1,n6,n7). % sam's vs tina's drawing forbidden_equivalence(g1,n2,n6). % another one forbidden_equivalence(g1,n7,n12). correct_result(g1,n2,n7) :- schema1. correct_result(g1,n6,n7) :- schema2.