:- multifile sem/5, id/2. :- discontiguous sem/5, id/2. :- dynamic sem/5, id/2. id(1,1). %%% How many lemons did Dr Jekyll eat ? sem(1, [word(1001, 'How'), word(1002, many), word(1003, lemons), word(1004, did), word(1005, 'Dr'), word(1006, 'Jekyll'), word(1007, eat), word(1008, ?)], [pos(1001, 'WRB'), pos(1002, 'JJ'), pos(1003, 'NNS'), pos(1004, 'VBD'), pos(1005, 'NNP'), pos(1006, 'NNP'), pos(1007, 'VB'), pos(1008, '.')], [], smerge(drs([[1005, 1006]:x0], [[1006]:named(x0, jekyll, per, 0), [1005]:named(x0, dr, ttl, 0)]), drs([], [[1001]:whq([num:cou], drs([[1001]:x1, [1001]:x2, [1002]:x3], [[1001]:card(x1, x2, eq), [1002]:pred(x3, quantity, n, 1), [1003]:pred(x3, lemon, n, 0), [1001]:eq(x1, x3)]), x2, drs([[1007]:x4], [[1007]:pred(x4, eat, v, 0), []:pred(x4, event, n, 1), [1007]:rel(x4, x0, agent, 0), [1007]:rel(x4, x1, patient, 0)]))])) ). %%% ______________________ _______________________________________ %%% | x0 | | | %%% |______________________| |_______________________________________| %%% (| named(x0,jekyll,per) |+| ______________ ________________ |) %%% | named(x0,dr,ttl) | | | x1 x2 x3 | | x4 | | %%% |______________________| | |______________| |________________| | %%% | | |x1| == x2 | ? | eat(x4) | | %%% | | quantity(x3) | | event(x4) | | %%% | | lemon(x3) | | agent(x4,x0) | | %%% | | x1 = x3 | | patient(x4,x1) | | %%% | |______________| |________________| | %%% |_______________________________________|