:- multifile sem/5, id/2. :- discontiguous sem/5, id/2. :- dynamic sem/5, id/2. id(1,1). %%% Mr. Jekyll ate four lemons and five apples . sem(1, [word(1001, 'Mr.'), word(1002, 'Jekyll'), word(1003, ate), word(1004, four), word(1005, lemons), word(1006, and), word(1007, five), word(1008, apples), word(1009, '.')], [pos(1001, 'NNP'), pos(1002, 'NNP'), pos(1003, 'VBD'), pos(1004, 'CD'), pos(1005, 'NNS'), pos(1006, 'CC'), pos(1007, 'CD'), pos(1008, 'NNS'), pos(1009, '.')], [ne(1001, 'I-PER'), ne(1002, 'I-PER')], smerge(drs([[1001, 1002]:x0], [[1002]:named(x0, jekyll, per, 0), [1001]:named(x0, mr, ttl, 0)]), drs([[1004, 1005]:x1, [1003]:x2, [1007, 1008]:x3, [1003]:x4], [[1004]:card(x1, 4, ge), [1007]:card(x3, 5, ge), [1005]:pred(x1, lemon, n, 0), [1003]:pred(x2, eat, v, 0), []:pred(x2, event, n, 1), [1008]:pred(x3, apple, n, 0), [1003]:pred(x4, eat, v, 0), []:pred(x4, event, n, 1), [1003]:rel(x2, x0, agent, 0), [1003]:rel(x2, x1, patient, 0), [1003]:rel(x4, x0, agent, 0), [1003]:rel(x4, x3, patient, 0)])) ). %%% ______________________ ________________ %%% | x0 | | x1 x2 x3 x4 | %%% |______________________| |________________| %%% (| named(x0,jekyll,per) |+| |x1| >= 4 |) %%% | named(x0,mr,ttl) | | |x3| >= 5 | %%% |______________________| | lemon(x1) | %%% | eat(x2) | %%% | event(x2) | %%% | apple(x3) | %%% | eat(x4) | %%% | event(x4) | %%% | agent(x2,x0) | %%% | patient(x2,x1) | %%% | agent(x4,x0) | %%% | patient(x4,x3) | %%% |________________|