:- multifile sem/5, id/2. :- discontiguous sem/5, id/2. :- dynamic sem/5, id/2. id(1,1). %%% Pierre Vinken , 61 years old , will join the board as a nonexecutive director Nov. 29 . sem(1, [word(1001, 'Pierre'), word(1002, 'Vinken'), word(1003, (',')), word(1004, '61'), word(1005, years), word(1006, old), word(1007, (',')), word(1008, will), word(1009, join), word(1010, the), word(1011, board), word(1012, as), word(1013, a), word(1014, nonexecutive), word(1015, director), word(1016, 'Nov.'), word(1017, '29'), word(1018, '.')], [pos(1001, 'NNP'), pos(1002, 'NNP'), pos(1003, (',')), pos(1004, 'CD'), pos(1005, 'NNS'), pos(1006, 'JJ'), pos(1007, (',')), pos(1008, 'MD'), pos(1009, 'VB'), pos(1010, 'DT'), pos(1011, 'NN'), pos(1012, 'IN'), pos(1013, 'DT'), pos(1014, 'JJ'), pos(1015, 'NN'), pos(1016, 'NNP'), pos(1017, 'CD'), pos(1018, '.')], [ne(1001, 'I-PER'), ne(1002, 'I-PER'), ne(1016, 'I-DAT'), ne(1017, 'I-DAT')], smerge(drs([[1001, 1002, 1004, 1005, 1006]:x0, [1004, 1005]:x1, [1006]:x2, [1010]:x3], [[1004]:card(x1, 61, ge), [1005]:pred(x1, year, n, 0), []:pred(x2, event, n, 1), [1006]:rel(x2, x1, rel, 0), [1002]:named(x0, vinken, per, 0), [1001]:named(x0, pierre, per, 0), [1006]:prop(x2, drs([], [[1006]:pred(x0, old, a, 0)])), [1011]:pred(x3, board, n, 0)]), drs([[1009]:x4, [1013]:x5, [1016]:x6], [[1009]:pred(x4, join, v, 0), [1014]:pred(x5, nonexecutive, a, 0), [1015]:pred(x5, director, n, 0), []:pred(x4, event, n, 1), [1009]:rel(x4, x0, agent, 0), [1009]:rel(x4, x3, patient, 0), [1012]:rel(x4, x5, as, 0), [1016]:rel(x4, x6, rel, 0), [1016, 1017]:timex(x6, date([]: +, []:'XXXX', [1016]:'11', [1017]:'29'))])) ). %%% ______________________ ____________________ %%% | x0 x1 x2 x3 | | x4 x5 x6 | %%% |______________________| |____________________| %%% (| |x1| >= 61 |+| join(x4) |) %%% | year(x1) | | nonexecutive(x5) | %%% | event(x2) | | director(x5) | %%% | rel(x2,x1) | | event(x4) | %%% | named(x0,vinken,per) | | agent(x4,x0) | %%% | named(x0,pierre,per) | | patient(x4,x3) | %%% | _________ | | as(x4,x5) | %%% | | | | | rel(x4,x6) | %%% | x2:|_________| | | timex(x6)=XXXX1129 | %%% | | old(x0) | | |____________________| %%% | |_________| | %%% | board(x3) | %%% |______________________|