2:- module(verbs,
    3          [semlex_verb/5,    % +Cat, +Sym, +Index, +Att--Att, -Sem
    4           aux_modal_verb/1
    5          ]).    6
    7:- use_module(boxer(slashes)).    8:- use_module(semlib(options),[option/2]).    9:- use_module(library(lists),[member/2]).   10:- use_module(lex(tense),[tense/4,aspect/5]).   11:- use_module(boxer(categories),[roles/4,att/3]).   12:- use_module(boxer(closure),[plosing/1]).   13
   14
   15/* =========================================================================
   16   I n t r a n s i t i v e   V e r b s
   17========================================================================= */
   18
   19/* -------------------------------------------------------------------------
   20   VP Ellipsis (... so does NP ...)
   21------------------------------------------------------------------------- */
   22
   23semlex_verb(Cat,do,Index,Att1-Att3,Sem):- 
   24   option('--vpe',true),
   25   member(Cat,[(s:dcl\(s:adj\np))/np]),
   26   roles(Sym,(s:dcl\np)/np,[Role],Att1-Att2), !,
   27   DRS = merge(B:drs([B:[]:E],
   28                     [B:Index:pred(E,Sym,v,98),
   29                      B:[]:role(E,X,Role,1)]),
   30               app(P,E)),
   31   tense(dcl,[],Att2-Att3,TDRS),
   32   Sem = lam(NP,lam(_ADJ,app(TDRS,lam(P,app(NP,lam(X,DRS)))))).
   33
   34/* -------------------------------------------------------------------------
   35   Intransitive (VP Ellipsis)
   36------------------------------------------------------------------------- */
   37
   38semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):-
   39   option('--vpe',true),
   40   option('--modal',true),
   41   modal_verb(pos,Sym,_),
   42   member(Cat,[s:Mood\np,s:Mood/np]), 
   43   roles(Sym,Cat,[Role],Att1-Att2), !,
   44   DRS = merge(B:drs([B:[]:E],
   45                     [B:Index:pred(E,Sym,v,98),
   46                      B:[]:role(E,X,Role,1)]),
   47               app(P,E)),
   48   tense(Mood,[],Att2-Att3,TDRS),
   49   Sem = lam(NP,app(TDRS,lam(P,B2:drs([],[B2:[]:pos(app(NP,lam(X,DRS)))])))).
   50
   51semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):-
   52   option('--vpe',true),
   53   option('--modal',true),
   54   modal_verb(nec,Sym,_),
   55   member(Cat,[s:Mood\np,s:Mood/np]), 
   56   roles(Sym,Cat,[Role],Att1-Att2), !,
   57   DRS = merge(B1:drs([B1:[]:E],
   58                      [B1:Index:pred(E,Sym,v,98),
   59                       B1:[]:role(E,X,Role,1)]),
   60               app(P,E)),
   61   tense(Mood,[],Att2-Att3,TDRS),
   62   Sem = lam(NP,app(TDRS,lam(P,B2:drs([],[B2:[]:nec(app(NP,lam(X,DRS)))])))).
   63
   64semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):- 
   65   option('--vpe',true),
   66   aux_modal_verb(Sym),
   67   member(Cat,[s:Mood\np,s:Mood/np]), 
   68   roles(Sym,Cat,[Role],Att1-Att2), !,
   69   ( Sym = do, \+ Mood = pss, \+ Mood = pt ; \+ Sym = do ), 
   70   ( Sym = can, \+ Mood = pss ; \+ Sym = can ), 
   71   !,   %%% VP Ellipsis
   72   DRS = merge(B:drs([B:[]:E],
   73                     [B:Index:pred(E,Sym,v,98),
   74                      B:[]:role(E,X,Role,1)]),
   75               app(P,E)),
   76   tense(Mood,[],Att2-Att3,TDRS),
   77   Sem = lam(NP,app(TDRS,lam(P,app(NP,lam(X,DRS))))).
   78
   79
   80/* -------------------------------------------------------------------------
   81   more/less than X
   82------------------------------------------------------------------------- */
   83
   84semlex_verb(s:adj\np,more,Index,Att-[sem:'MOR'|Att],Sem):- !,
   85   att(Att,sense,Sense),
   86   Sem = lam(NP,lam(E,app(NP,lam(X,merge(B:drs([B:[]:S],[B:Index:pred(S,more,a,Sense),
   87                                                         B:[]:role(X,S,'Theme',-1)]),app(E,S)))))).
   88
   89semlex_verb(s:adj\np,less,Index,Att-[sem:'LES'|Att],Sem):- !,
   90   att(Att,sense,Sense),
   91   Sem = lam(NP,lam(E,app(NP,lam(X,merge(B:drs([B:[]:S],[B:Index:pred(S,less,a,Sense),
   92                                                         B:[]:role(X,S,'Theme',-1)]),app(E,S)))))).
   93
   94
   95/* -------------------------------------------------------------------------
   96   Adjectival (possible, necessary)
   97
   98semlex_verb(s:adj\np,possible,Index,Att-Att,Sem):- 
   99   option('--modal',true), !,
  100   Sem = lam(NP,lam(P,merge(B1:drs([B1:[]:E],
  101                                   [B1:[]:pos(app(NP,lam(X,B2:drs([],[B2:Index:role(E,X,theme,1)]))))]),
  102                            app(P,E)))).
  103
  104semlex_verb(s:adj\np,necessary,Index,Att-Att,Sem):- 
  105   option('--modal',true), !,
  106   Sem = lam(NP,lam(P,merge(B1:drs([B1:[]:E],
  107                                   [B1:[]:nec(app(NP,lam(X,B2:drs([],[B2:Index:role(E,X,theme,1)]))))]),
  108                            app(P,E)))).
  109------------------------------------------------------------------------- */
  110
  111
  112/* -------------------------------------------------------------------------
  113   Intransitive (comparative)
  114------------------------------------------------------------------------- */
  115
  116semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):- 
  117   member(Cat,[s:adj\np,s:adj/np]),
  118   att(Att1,pos,'JJR'),
  119   roles(Sym,Cat,[Role],Att1-Att2), !,
  120   att(Att2,sense,Sense),
  121   DRS = merge(B:drs([B:[]:E],
  122                     [B:Index:pred(E,Sym,a,Sense),B:[]:role(E,X,Role,1),B:[]:pred(E,more,r,1)]),
  123               app(P,E)),
  124   tense(com,[],Att2-Att3,TDRS),
  125   Sem = lam(NP,app(TDRS,lam(P,app(NP,lam(X,DRS))))).
  126
  127
  128/* -------------------------------------------------------------------------
  129   Intransitive (standard case)
  130------------------------------------------------------------------------- */
  131
  132semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):- 
  133   member(Cat,[s:Mood\np,s:Mood/np]),
  134   roles(Sym,Cat,[Role],Att1-Att2), !,
  135   ( Mood=adj, !, Pos=a; \+ Mood=adj, Pos=v ),
  136   att(Att2,sense,Sense),
  137   DRS = merge(B:drs([B:[]:E],
  138                     [B:Index:pred(E,Sym,Pos,Sense),B:[]:role(E,X,Role,1)]),
  139               app(P,E)),
  140   tense(Mood,[],Att2-Att3,TDRS),
  141   Sem = lam(NP,app(TDRS,lam(P,app(NP,lam(X,DRS))))).
  142
  143
  144/* -------------------------------------------------------------------------
  145   Passive Phrasal Verbs ("An action has been called for by an official")
  146------------------------------------------------------------------------- */
  147
  148semlex_verb(Cat,Sym,Index,Att-[sem:'EXV'|Att],Sem):-
  149   Cat = (s:pss\np)/(pp/np), !,
  150   att(Att,sense,Sense),
  151   Sem = lam(PP,lam(NP,lam(F,merge(B:drs([B:[]:E],
  152                                         [B:Index:pred(E,Sym,v,Sense)]),
  153                                   merge(app(app(PP,NP),E),
  154                                         app(F,E)))))).
  155
  156
  157
  158/* =========================================================================
  159   T r a n s i t i v e   V e r b s
  160========================================================================= */
  161
  162/* -------------------------------------------------------------------------
  163    Copula (experimental, giving negation wide scope in 'there is no')
  164------------------------------------------------------------------------- */
  165
  166semlex_verb(Cat,be,Index,Att1-[sem:'EXS'|Att2],Sem):- 
  167   option('--x',true),
  168   option('--copula',true),
  169   member(Cat,[(s:Mood\np)/np,(s:Mood/np)/np]), !,
  170   DRS = merge(B:drs([B:[]:E],
  171                     [B:[]:prop(E,app(NP2,lam(Y,app(NP1,lam(X,B2:drs([],[B2:Index:eq(X,Y)]))))))]),
  172               app(P,E)),
  173   tense(Mood,[],Att1-Att2,TDRS),
  174   Sem = lam(NP2,lam(NP1,app(TDRS,lam(P,DRS)))).
  175
  176
  177/* -------------------------------------------------------------------------
  178    Copula 
  179------------------------------------------------------------------------- */
  180
  181semlex_verb(Cat,be,Index,Att1-Att2,Sem):- 
  182   option('--semantics',amr),
  183   member(Cat,[(s:Mood\np)/np,(s:Mood/np)/np]), !,
  184   DRS = app(NP2,lam(Y,merge(B2:drs([],[B2:Index:rel(Y,X,domain,1)]),app(P,Y)))),
  185   tense(Mood,[],Att1-Att2,TDRS),
  186   Sem = lam(NP2,lam(NP1,app(TDRS,lam(P,app(NP1,lam(X,DRS)))))).
  187
  188semlex_verb(Cat,be,Index,Att1-[sem:'EXS'|Att2],Sem):- 
  189   option('--copula',true),
  190   member(Cat,[(s:Mood\np)/np,(s:Mood/np)/np]), !,
  191   DRS = merge(B:drs([B:[]:E],
  192                     [B:[]:prop(E,app(NP2,lam(Y,B2:drs([],[B2:Index:eq(X,Y)]))))]),
  193               app(P,E)),
  194   tense(Mood,[],Att1-Att2,TDRS),
  195   Sem = lam(NP2,lam(NP1,app(TDRS,lam(P,app(NP1,lam(X,DRS)))))).
  196
  197
  198
  199/* -------------------------------------------------------------------------
  200    Copula  (place holder for be with IS-A sense)
  201------------------------------------------------------------------------- */
  202
  203semlex_verb(Cat,be,Index,Att1-[sem:'EXS'|Att2],Sem):-         
  204   option('--copula',true),
  205   member(Cat,[(s:Mood\np)/np,(s:Mood/np)/np]), !,
  206   DRS = merge(B:drs([B:[]:E],
  207                     [B:[]:prop(E,B2:drs([],[B2:[]:imp(merge(B3:drs([B3:[]:X],[]),app(NP1,lam(Y,B4:drs([],[B4:[]:eq(Y,X)])))),
  208                                                    app(NP2,lam(Y,B5:drs([],[B5:Index:eq(Y,X)]))))]))]),
  209               app(P,E)),
  210   tense(Mood,[],Att1-Att2,TDRS),
  211   Sem = lam(NP2,lam(NP1,app(TDRS,lam(P,DRS)))).
  212
  213
  214/* -------------------------------------------------------------------------
  215    Copula  (identity reading)
  216------------------------------------------------------------------------- */
  217
  218semlex_verb(Cat,be,Index,Att1-[sem:'EXS'|Att3],Sem):- 
  219   member(Cat,[(s:Mood\np)/np,(s:Mood/np)/np]), !,
  220   DRS = merge(B:drs([B:[]:E],
  221                     [B:Index:pred(E,identical,a,1),
  222                      B:[]:role(E,X,'Pivot',1),
  223                      B:[]:role(E,Y,'Theme',1)]),
  224               app(P,E)),
  225   tense(Mood,[],Att1-Att3,TDRS),
  226   Sem = lam(NP2,lam(NP1,app(TDRS,
  227                             lam(P,app(NP1,
  228                                       lam(X,app(NP2,
  229                                                 lam(Y,DRS)))))))).
  230
  231
  232/* -------------------------------------------------------------------------
  233   Transitive (np V np) comparative
  234------------------------------------------------------------------------- */
  235
  236semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):-
  237   member(Cat, [(s:adj\np)\np]), 
  238   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,
  239   att(Att2,sense,Sense),
  240   DRS = merge(B:drs([B:[]:E],
  241                     [B:Index:pred(E,Sym,v,Sense),B:[]:pred(E,more,r,1),
  242                      B:[]:role(E,X,Role1,1),B:[]:role(E,Y,Role2,1)]),
  243               app(P,E)),
  244   tense(com,[],Att2-Att3,TDRS),
  245   Sem = lam(NP2,lam(NP1,app(TDRS,
  246                             lam(P,app(NP1,
  247                                       lam(X,app(NP2,
  248                                                 lam(Y,DRS)))))))).
  249
  250
  251/* -------------------------------------------------------------------------
  252   Transitive (np V np) extensional
  253------------------------------------------------------------------------- */
  254
  255semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  256   member(Cat, [(s:Mood\np)/np,(s:Mood/np)/np,(s:Mood\np)\np]), 
  257   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,
  258   ( Mood=adj, !, Pos=a; \+ Mood=adj, Pos=v ),
  259   att(Att2,sense,Sense),
  260   DRS = merge(B:drs([B:[]:E],
  261                     [B:Index:pred(E,Sym,Pos,Sense),
  262                      B:[]:role(E,X,Role1,1),
  263                      B:[]:role(E,Y,Role2,1)]),
  264               app(P,E)),
  265   tense(Mood,[],Att2-Att3,TDRS),
  266   Sem = lam(NP2,lam(NP1,app(TDRS,
  267                             lam(P,app(NP1,
  268                                       lam(X,app(NP2,
  269                                                 lam(Y,DRS)))))))).
  270
  271/* -------------------------------------------------------------------------
  272   Transitive (there is NP)
  273   Not working currently because thr is stripped of NP category
  274
  275semlex_verb((s:Mood\np_thr)/np,_,Index,Att1-Att2,Sem):- !,
  276   tense(Mood,Index,Att1-Att2,TDRS),
  277   Sem = lam(NP,lam(_,app(TDRS,lam(F,app(NP,lam(X,merge(B:drs([B:[]:E],
  278                                                            [B:Index:pred(E,be,v,5), 
  279                                                             B:[]:role(E,X,agent,1)]),
  280                                                        app(F,E)))))))).
  281------------------------------------------------------------------------- */
  282
  283
  284/* -------------------------------------------------------------------------
  285   Transitive (np V pp)
  286------------------------------------------------------------------------- */
  287
  288semlex_verb(Cat,be,Index,Att1-[sem:'EXS'|Att2],Sem):-
  289   option('--copula',true),
  290   member(Cat,[(s:Mood\np)/pp,(s:Mood/np)/pp]), !,
  291   DRS = merge(B:drs([B:[]:E],
  292                     [B:[]:prop(E,app(PP,Y))]),
  293               app(P,E)),
  294   tense(Mood,Index,Att1-Att2,TDRS),
  295   Sem = lam(PP,lam(NP,app(TDRS,lam(P,app(NP,lam(Y,DRS)))))).
  296
  297semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  298   member(Cat,[(s:Mood\np)/pp,(s:Mood/np)/pp]), 
  299   roles(Sym,Cat,[Role],Att1-Att2), !,
  300   att(Att2,sense,Sense),
  301   ( Mood=adj, !, Pos=a; \+ Mood=adj, Pos=v ),
  302   DRS = merge(merge(B:drs([B:[]:E],
  303                           [B:Index:pred(E,Sym,Pos,Sense),
  304                            B:[]:role(E,Y,Role,1)]),
  305                     app(PP,E)),
  306               app(P,E)),
  307   tense(Mood,[],Att2-Att3,TDRS),
  308   Sem = lam(PP,lam(NP,app(TDRS,lam(P,app(NP,lam(Y,DRS)))))).
  309
  310
  311/* -------------------------------------------------------------------------
  312   Transitive (pp V np)
  313------------------------------------------------------------------------- */
  314
  315semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  316   member(Cat,[(s:Mood\pp)/np,(s:Mood/pp)/np]),
  317   roles(Sym,Cat,[Role],Att1-Att2), !,
  318   att(Att2,sense,Sense),
  319   DRS = merge(merge(B:drs([B:[]:E],
  320                           [B:Index:pred(E,Sym,v,Sense),
  321                            B:[]:role(E,Y,Role,1)]),
  322                     app(PP,E)),
  323               app(P,E)),
  324   tense(Mood,[],Att2-Att3,TDRS),
  325   Sem = lam(NP,lam(PP,app(TDRS,lam(P,app(NP,lam(Y,DRS)))))).
  326
  327
  328/* =========================================================================
  329   D i t r a n s i t i v e   V e r b s
  330========================================================================= */
  331
  332/* -------------------------------------------------------------------------
  333   Ditransitive (np V np np)
  334------------------------------------------------------------------------- */
  335
  336semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  337   Cat = ((s:Mood\np)/np)/np, !,
  338   roles(Sym,Cat,[Role3,Role2,Role1],Att1-Att2),
  339   att(Att2,sense,Sense),
  340   DRS = merge(B:drs([B:[]:E],
  341                     [B:Index:pred(E,Sym,v,Sense),
  342                      B:[]:role(E,X,Role1,1),
  343                      B:[]:role(E,Y,Role2,1),
  344                      B:[]:role(E,Z,Role3,1)]),
  345               app(P,E)),
  346   tense(Mood,[],Att2-Att3,TDRS),
  347   Sem = lam(NP3,lam(NP2,lam(NP1,app(TDRS,
  348                                     lam(P,app(NP1,
  349                                               lam(X,app(NP2,
  350                                                         lam(Y,app(NP3,
  351                                                                   lam(Z,DRS))))))))))).
  352
  353/* -------------------------------------------------------------------------
  354   Ditransitive (np V np pp)   
  355------------------------------------------------------------------------- */
  356
  357semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  358   Cat = ((s:Mood\np)/pp)/np,
  359   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,
  360   ( Mood=adj, !, Pos=a; \+ Mood=adj, Pos=v ),
  361   att(Att2,sense,Sense),
  362   DRS = merge(B:drs([B:[]:E],
  363                     [B:Index:pred(E,Sym,Pos,Sense),
  364                      B:[]:role(E,Y,Role1,1),
  365                      B:[]:role(E,X,Role2,1)]),
  366               merge(app(PP,E),
  367                     app(P,E))),
  368   tense(Mood,[],Att2-Att3,TDRS),
  369   Sem = lam(NP1,lam(PP,lam(NP2,app(TDRS,
  370                                    lam(P,app(NP2,
  371                                              lam(Y,app(NP1,
  372                                                        lam(X,DRS))))))))).
  373
  374/* -------------------------------------------------------------------------
  375   Ditransitive (np V pp np)   
  376------------------------------------------------------------------------- */
  377
  378semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  379   member(Cat,[((s:Mood\np)/np)/pp,((s:Mood\np)\np)/pp,((s:Mood/np)/np)/pp]),
  380   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,
  381   ( Mood=adj, !, Pos=a; \+ Mood=adj, Pos=v ),
  382   att(Att2,sense,Sense),
  383   DRS = merge(B:drs([B:[]:E],
  384                     [B:Index:pred(E,Sym,Pos,Sense),
  385                      B:[]:role(E,Y,Role1,1),
  386                      B:[]:role(E,X,Role2,1)]),
  387               merge(app(PP,E),
  388                     app(P,E))),
  389   tense(Mood,[],Att2-Att3,TDRS),
  390   Sem = lam(PP,lam(NP1,lam(NP2,app(TDRS,
  391                                    lam(P,app(NP2,
  392                                              lam(Y,app(NP1,
  393                                                        lam(X,DRS))))))))).
  394
  395
  396/* -------------------------------------------------------------------------
  397   Ditransitive (np V pp pp)
  398------------------------------------------------------------------------- */
  399
  400semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  401   member(Cat,[((s:Mood\np)/pp)/pp,((s:Mood/np)/pp)/pp]),
  402   roles(Sym,Cat,[Role],Att1-Att2), !,
  403   ( Mood=adj, !, Pos=a; \+ Mood=adj, Pos=v ),
  404   att(Att2,sense,Sense),
  405   DRS = merge(B:drs([B:[]:E],
  406                     [B:Index:pred(E,Sym,Pos,Sense),
  407                      B:[]:role(E,Y,Role,1)]),
  408               merge(app(PP1,E),
  409                     merge(app(PP2,E),
  410                           app(P,E)))),
  411   tense(Mood,[],Att2-Att3,TDRS),
  412   Sem = lam(PP1,lam(PP2,lam(NP,app(TDRS,
  413                                    lam(P,app(NP,lam(Y,DRS))))))).
  414
  415
  416/* -------------------------------------------------------------------------
  417   Ditransitive (pp V np np)   
  418------------------------------------------------------------------------- */
  419
  420semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  421   member(Cat,[((s:Mood\pp)/np)/np,((s:Mood/pp)/np)/np]),
  422   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,
  423   att(Att2,sense,Sense),
  424   DRS = merge(B:drs([B:[]:E],
  425                     [B:Index:pred(E,Sym,v,Sense),
  426                      B:[]:role(E,Y,Role1,1),
  427                      B:[]:role(E,X,Role2,1)]),
  428               merge(app(PP,E),
  429                     app(P,E))),
  430   tense(Mood,[],Att2-Att3,TDRS),
  431   Sem = lam(NP1,lam(NP2,lam(PP,app(TDRS,
  432                                    lam(P,app(NP2,
  433                                              lam(Y,app(NP1,
  434                                                        lam(X,DRS))))))))).
  435
  436/* -------------------------------------------------------------------------
  437   Ditransitive (pp V np pp)
  438------------------------------------------------------------------------- */
  439
  440semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  441   member(Cat,[((s:Mood\pp)/pp)/np,((s:Mood/pp)/pp)/np]),
  442   roles(Sym,Cat,[Role],Att1-Att2), !,
  443   att(Att2,sense,Sense),
  444   DRS = merge(B:drs([B:[]:E],
  445                     [B:Index:pred(E,Sym,v,Sense),
  446                      B:[]:role(E,Y,Role,1)]),
  447               merge(app(PP1,E),
  448                     merge(app(PP2,E),
  449                           app(P,E)))),
  450   tense(Mood,[],Att2-Att3,TDRS),
  451   Sem = lam(NP,lam(PP1,lam(PP2,app(TDRS,
  452                                    lam(P,app(NP,
  453                                              lam(Y,DRS))))))).
  454
  455
  456/* =========================================================================
  457   T r i t r a n s i t i v e   V e r b s
  458========================================================================= */
  459
  460/* -------------------------------------------------------------------------
  461   Tritransitive (np V np pp pp)
  462------------------------------------------------------------------------- */
  463
  464semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  465   Cat = (((s:Mood\np)/pp)/pp)/np,
  466   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,   
  467   att(Att2,sense,Sense),
  468   DRS = merge(B:drs([B:[]:E],
  469                     [B:Index:pred(E,Sym,v,Sense),
  470                      B:[]:role(E,Y,Role1,1),
  471                      B:[]:role(E,X,Role2,1)]),
  472               merge(merge(app(PP1,E),
  473                           app(PP2,E)),
  474                     app(P,E))),
  475   tense(Mood,[],Att2-Att3,TDRS),
  476   Sem = lam(NP1,lam(PP1,lam(PP2,lam(NP2,app(TDRS,
  477                                             lam(P,app(NP2,
  478                                                       lam(Y,app(NP1,
  479                                                                 lam(X,DRS)))))))))).
  480
  481semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  482   Cat = (((s:Mood\np)/pp)/np)/pp,
  483   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,   
  484   att(Att2,sense,Sense),
  485   DRS = merge(B:drs([B:[]:E],
  486                     [B:Index:pred(E,Sym,v,Sense),
  487                      B:[]:role(E,Y,Role1,1),
  488                      B:[]:role(E,X,Role2,1)]),
  489               merge(merge(app(PP1,E),
  490                           app(PP2,E)),
  491                     app(P,E))),
  492   tense(Mood,[],Att2-Att3,TDRS),
  493   Sem = lam(PP1,lam(NP1,lam(PP2,lam(NP2,app(TDRS,
  494                                             lam(P,app(NP2,
  495                                                       lam(Y,app(NP1,
  496                                                                 lam(X,DRS)))))))))).
  497
  498    
  499/* =========================================================================
  500   P r o p o s i t i o n a l   c o m p l e m e n t   v e r b s
  501========================================================================= */
  502
  503/* -------------------------------------------------------------------------
  504   Intransitive (np V s)
  505------------------------------------------------------------------------- */
  506
  507semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  508   Cat = (s:Mood\np)/s:Emb,
  509   member(Emb,[em,bem,qem,for]),
  510   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,   
  511   att(Att2,sense,Sense),
  512   DRS = merge(B:drs([B:[]:E],
  513                     [B:Index:pred(E,Sym,v,Sense),
  514                      B:[]:role(E,Y,Role1,1),
  515                      B:[]:role(E,K,Role2,1)]),
  516               app(F,E)),
  517   tense(Mood,[],Att2-Att3,TDRS),
  518   Sem = lam(S,lam(Q,app(TDRS,lam(F,app(Q,lam(Y,app(S,lam(K,DRS)))))))).
  519
  520semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  521   Cat = (s:Mood\np)/s:_,
  522   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,   
  523   att(Att2,sense,Sense),
  524   plosing(CC),
  525   DRS = merge(B:drs([B:[]:E,B:[]:A],
  526                     [B:Index:pred(E,Sym,v,Sense),
  527                      B:[]:role(E,Y,Role1,1),
  528                      B:[]:role(E,A,Role2,1),
  529                      B:[]:prop(A,app(S,CC))]),
  530               app(F,E)),
  531   tense(Mood,[],Att2-Att3,TDRS),
  532   Sem = lam(S,lam(Q,app(TDRS,lam(F,app(Q,lam(Y,DRS)))))).
  533
  534/* -------------------------------------------------------------------------
  535   Intransitive (np V pp s)
  536------------------------------------------------------------------------- */
  537
  538semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  539   Cat = ((s:Mood\np)/s:_)/pp,
  540   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,   
  541   att(Att2,sense,Sense),
  542   plosing(CC),
  543   DRS = merge(B:drs([B:[]:E,B:[]:A],
  544                     [B:Index:pred(E,Sym,v,Sense),
  545                      B:[]:role(E,Y,Role1,1),
  546                      B:[]:role(E,A,Role2,1),
  547                      B:[]:prop(A,app(S,CC))]),
  548               merge(app(PP,E),app(F,E))),
  549   tense(Mood,[],Att2-Att3,TDRS),
  550   Sem = lam(PP,lam(S,lam(Q,app(TDRS,lam(F,app(Q,lam(Y,DRS))))))).
  551
  552/* -------------------------------------------------------------------------
  553   Intransitive (s np V)
  554------------------------------------------------------------------------- */
  555
  556semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  557   att(Att1,pos,POS),
  558   \+ member(POS,['IN','RRB','RB','TO']),    %%% exclude prepositions, adverbs
  559   member(Cat,[(s:Mood\s:SM)\np,(s:Mood/s:SM)/np,(s:Mood\s:SM)/np,(s:Mood/s:SM)\np]),
  560   roles(Sym,(s:Mood\np)/s:SM,[Role1,Role2],Att1-Att2), !,   
  561   att(Att2,sense,Sense),
  562   plosing(CC),
  563   DRS = merge(B:drs([B:[]:E,B:[]:A],
  564                     [B:Index:pred(E,Sym,v,Sense),
  565                      B:[]:role(E,Y,Role2,1),
  566                      B:[]:role(E,A,Role1,1),
  567                      B:[]:prop(A,app(S,CC))]),
  568               app(F,E)),
  569   tense(Mood,[],Att2-Att3,TDRS),
  570   Sem = lam(Q,lam(S,app(TDRS,lam(F,app(Q,lam(Y,DRS)))))).
  571
  572
  573/* -------------------------------------------------------------------------
  574   Intransitive (vp V np)
  575------------------------------------------------------------------------- */
  576
  577semlex_verb(Cat,_Sym,Index,Att1-[sem:'EXS'|Att2],Sem):-
  578   Cat = (s:Mood\(s:Aspect\np))/np, !,
  579   aspect(Aspect,Mood,Index,Att1-Att2,TDRS),
  580   Sem = lam(NP,lam(VP,app(TDRS,app(VP,NP)))).
  581
  582
  583/* -------------------------------------------------------------------------
  584   Transitive (s np V np)
  585------------------------------------------------------------------------- */
  586
  587semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  588   member(Cat, [((s:Mood\s:_)\np)/np]), 
  589   roles(Sym,Cat,[Role3,Role2,Role1],Att1-Att2), !,
  590   plosing(CC),
  591   att(Att2,sense,Sense),
  592   DRS = merge(B:drs([B:[]:E,B:[]:A],
  593                     [B:Index:pred(E,Sym,v,Sense),
  594                      B:[]:role(E,Y,Role1,1),
  595                      B:[]:role(E,Z,Role3,1),
  596                      B:[]:role(E,A,Role2,1),
  597                      B:[]:prop(A,app(S,CC))]),
  598               app(F,E)),
  599   tense(Mood,[],Att2-Att3,TDRS),
  600   Sem = lam(R,lam(Q,lam(S,app(TDRS,lam(F,app(R,lam(Z,app(Q,lam(Y,DRS))))))))).
  601
  602
  603/* -------------------------------------------------------------------------
  604   Transitive (np V np s)
  605------------------------------------------------------------------------- */
  606
  607semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  608   member(Cat, [((s:Mood\np)/s:_)/np]), 
  609   roles(Sym,Cat,[Role3,Role2,Role1],Att1-Att2), !,
  610   plosing(CC),
  611   att(Att2,sense,Sense),
  612   DRS = merge(B:drs([B:[]:E,B:[]:A],
  613                     [B:Index:pred(E,Sym,v,Sense),
  614                      B:[]:role(E,X,Role1,1),
  615                      B:[]:role(E,A,Role2,1),
  616                      B:[]:role(E,Y,Role3,1),
  617                      B:[]:prop(A,app(S,CC))]),
  618               app(F,E)),
  619   tense(Mood,[],Att2-Att3,TDRS),
  620   Sem = lam(NP2,lam(S,lam(NP1,app(TDRS,lam(F,app(NP1,lam(X,app(NP2,lam(Y,DRS))))))))).
  621
  622/* -------------------------------------------------------------------------
  623   Transitive (np V vp np)
  624------------------------------------------------------------------------- */
  625
  626semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  627   Cat = ((s:Mood\np)/np)/(s:_\np),
  628   roles(Sym,(s:Mood\np)/s:_,[Role2,Role1],Att1-Att2), !,
  629   plosing(CC),
  630   att(Att2,sense,Sense),
  631   DRS = merge(B:drs([B:[]:E,B:[]:Z],
  632                     [B:Index:pred(E,Sym,v,Sense),
  633                      B:[]:role(E,X,Role1,1),
  634                      B:[]:role(E,Z,Role2,1),
  635                      B:[]:prop(Z,app(app(VP,NP2),CC))]),
  636               app(F,E)),
  637   tense(Mood,[],Att2-Att3,TDRS),
  638   Sem = lam(VP,lam(NP2,lam(NP1,app(TDRS,lam(F,app(NP1,lam(X,DRS))))))).
  639
  640/* -------------------------------------------------------------------------
  641   Transitive (np V vp pp)
  642------------------------------------------------------------------------- */
  643
  644semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  645   Cat = ((s:Mood\np)/pp)/(s:adj\np),
  646   roles(Sym,s:Mood\np,[Role],Att1-Att2), !,
  647   att(Att2,sense,Sense),
  648   tense(Mood,[],Att2-Att3,TDRS),
  649   Sem = lam(VP,lam(PP,lam(NP,app(TDRS,lam(F,app(NP,lam(X,merge(B:drs([B:[]:E],
  650                                                                      [B:Index:pred(E,Sym,v,Sense),
  651                                                                       B:[]:role(E,X,Role,1)]),
  652                                                                merge(app(PP,E),
  653                                                                      merge(app(app(VP,lam(P,app(P,E))),F),
  654                                                                            app(F,E))))))))))).
  655
  656
  657/* -------------------------------------------------------------------------
  658   Transitive (np V pp vp)
  659------------------------------------------------------------------------- */
  660
  661semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  662   Cat = ((s:Mood\np)/(s:adj\np))/pp,
  663   roles(Sym,s:Mood\np,[Role],Att1-Att2), !,
  664   att(Att2,sense,Sense),
  665   tense(Mood,[],Att2-Att3,TDRS),
  666   Sem = lam(PP,lam(AP,lam(NP,app(TDRS,lam(F,app(NP,lam(X,merge(B:drs([B:[]:E],
  667                                                                      [B:Index:pred(E,Sym,v,Sense),
  668                                                                       B:[]:role(E,X,Role,1)]),
  669                                                                merge(app(PP,E),
  670                                                                      merge(app(app(AP,lam(P,app(P,E))),F),
  671                                                                            app(F,E))))))))))).
  672
  673
  674/* =========================================================================
  675   A u x i l i a r y ,  M o d a l ,  C o n t r o l   V e r b s
  676========================================================================= */
  677
  678/* =========================================================================
  679   Infinitivals
  680========================================================================= */
  681
  682semlex_verb(Cat,_Sym,Index,Att-[sem:'SUB'|Att],Sem):-
  683   Cat = (s:to\np)/(s:b\np), !,
  684   plosing(CC),
  685%   Sem = lam(VP,lam(NP,lam(E,B:drs([B:Index:P],
  686%                                   [B:[]:prop(P,app(app(VP,NP),E))])))).
  687   Sem =  lam(V0,lam(V1,lam(V2,merge(B3:drs([B3:Index:P4],
  688                                            [B3:[]:prop(P4,app(app(V0,V1),CC))]),app(V2,P4))))).
  689
  690
  691/* -------------------------------------------------------------------------
  692   Standard case (NP aux VP)
  693------------------------------------------------------------------------- */
  694
  695semlex_verb(Cat,Sym,Index,Att1-[sem:'POS'|Att1],Sem):-
  696   option('--modal',true), 
  697   modal_verb(pos,Sym,_),
  698   Cat = (s:Mood\np)/(s:Aspect\np), 
  699   \+ Mood = Aspect, !,
  700   aspect(Aspect,Mood,Index,Att1-_,TDRS),
  701   Sem = lam(VP,lam(NP,lam(E,B:drs([],[B:Index:pos(app(app(TDRS,app(VP,NP)),E))])))).
  702
  703semlex_verb(Cat,Sym,Index,Att1-[sem:'NEC'|Att1],Sem):-
  704   option('--modal',true),
  705   Cat = (s:Mood\np)/(s:Aspect\np), 
  706   modal_verb(nec,Sym,Aspect),
  707   \+ Mood = Aspect, !,
  708   aspect(Aspect,Mood,Index,Att1-_,TDRS),
  709   Sem = lam(VP,lam(NP,lam(E,B:drs([],[B:Index:nec(app(app(TDRS,app(VP,NP)),E))])))).
  710
  711semlex_verb(Cat,Sym,Index,Att1-Att2,Sem):-
  712   aux_verb(Sym),
  713   Cat = (s:Mood\np)/(s:Aspect\np), \+ Aspect=to,
  714   \+ Mood = Aspect, !,
  715   aspect(Aspect,Mood,Index,Att1-Att2,TDRS),
  716   Sem = lam(VP,lam(NP,app(TDRS,app(VP,NP)))).
  717
  718
  719/* -------------------------------------------------------------------------
  720   Inversion case (aux NP VP)
  721------------------------------------------------------------------------- */
  722
  723semlex_verb(Cat,_Sym,Index,Att1-Att2,Sem):-
  724   Cat = (s:Mood/(s:Aspect\np))/np, 
  725   \+ Mood = Aspect, \+ Mood = for, !,
  726   aspect(Aspect,Mood,Index,Att1-Att2,TDRS),
  727   Sem = lam(NP,lam(VP,app(TDRS,app(VP,NP)))).
  728
  729
  730/* -------------------------------------------------------------------------
  731   Control Verbs (intransitive)
  732------------------------------------------------------------------------- */
  733
  734% e.g. "is about to swim"
  735%
  736semlex_verb(Cat,Sym,Index,Att1-[sem:'IST'|Att2],Sem):- 
  737   Cat = (s:adj\np)/(s:to\np), 
  738   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,
  739   att(Att2,sense,Sense),
  740   DRS = merge(B:drs([B:[]:E],
  741                     [B:Index:pred(E,Sym,a,Sense),
  742                      B:[]:role(E,X,Role1,1),
  743                      B:[]:role(E,K,Role2,1)]),
  744               app(F,E)),
  745   Sem = lam(VP,lam(NP,lam(F,app(NP,lam(X,app(app(VP,lam(P,app(P,X))),lam(K,DRS))))))).
  746
  747% e.g.  "hard to take", "easy to please"
  748%
  749semlex_verb(Cat,Sym,Index,Att1-[sem:'IST'|Att2],Sem):- 
  750   Cat = (s:adj\np)/((s:to\np)/np), 
  751   roles(Sym,(s:adj\np)/(s:to\np),[Role2,_],Att1-Att2), !,
  752   att(Att2,sense,Sense),
  753   DRS = merge(B:drs([B:[]:E],
  754                     [B:Index:pred(E,Sym,a,Sense),
  755                      B:[]:role(E,K,Role2,1)]),
  756               app(F,E)),
  757   NP = lam(P,merge(B2:drs([B2:[]:X],[B2:[]:pred(X,thing,n,12)]),app(P,X))),
  758   Sem = lam(TV,lam(Q,lam(F,app(app(app(TV,Q),NP),lam(K,DRS))))).
  759
  760% e.g. "wants to swim" 
  761%
  762semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):- 
  763   Cat = (s:Mood\np)/(s:to\np), \+ Mood = to,
  764   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,
  765   att(Att2,sense,Sense),
  766   DRS = merge(B:drs([B:[]:E],
  767                     [B:Index:pred(E,Sym,v,Sense),
  768                      B:[]:role(E,X,Role1,1),
  769                      B:[]:role(E,K,Role2,1)]),
  770               app(F,E)),
  771   tense(Mood,[],Att2-Att3,TDRS),
  772   Sem = lam(VP,lam(NP,app(TDRS,lam(F,app(NP,lam(X,app(app(VP,lam(P,app(P,X))),lam(K,DRS)))))))).
  773
  774% e.g. "help finish his homework"
  775%
  776semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):- 
  777   Cat = (s:b\np)/(s:b\np),   att(Att1,pos,'VB'),
  778   roles(Sym,(s:b\np)/(s:to\np),[Role2,Role1],Att1-Att2), !,
  779   plosing(CC),
  780   att(Att2,sense,Sense),
  781   DRS = merge(B:drs([B:[]:E,
  782                      B:[]:K],
  783                     [B:Index:pred(E,Sym,v,Sense),
  784                      B:[]:role(E,X,Role1,1),
  785                      B:[]:role(E,K,Role2,1),
  786                      B:[]:prop(K,app(app(VP,lam(P,app(P,X))),CC))]),
  787               app(F,E)),
  788   tense(b,[],Att2-Att3,TDRS),
  789   Sem = lam(VP,lam(NP,app(TDRS,lam(F,app(NP,lam(X,DRS)))))).
  790
  791% e.g. "helping walking home"
  792%
  793semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):- 
  794   Cat = (s:ng\np)/(s:ng\np),   att(Att1,pos,'VBG'),
  795   roles(Sym,(s:ng\np)/(s:to\np),[Role2,Role1],Att1-Att2), !,
  796   plosing(CC),
  797   att(Att2,sense,Sense),
  798   DRS = merge(B:drs([B:[]:E,
  799                      B:[]:K],
  800                     [B:Index:pred(E,Sym,v,Sense),
  801                      B:[]:role(E,X,Role1,1),
  802                      B:[]:role(E,K,Role2,1),
  803                      B:[]:prop(K,app(app(VP,lam(P,app(P,X))),CC))]),
  804               app(F,E)),
  805   tense(ng,[],Att2-Att3,TDRS),
  806   Sem = lam(VP,lam(NP,app(TDRS,lam(F,app(NP,lam(X,DRS)))))).
  807
  808% e.g. "were left stranded"
  809%
  810semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):- 
  811   Cat = (s:pss\np)/(s:pss\np),   att(Att1,pos,'VBN'),
  812   roles(Sym,(s:pss\np)/(s:to\np),[Role2,Role1],Att1-Att2), !,
  813   plosing(CC),
  814   att(Att2,sense,Sense),
  815   DRS = merge(B:drs([B:[]:E,
  816                      B:[]:K],
  817                     [B:Index:pred(E,Sym,v,Sense),
  818                      B:[]:role(E,X,Role1,1),
  819                      B:[]:role(E,K,Role2,1),
  820                      B:[]:prop(K,app(app(VP,lam(P,app(P,X))),CC))]),
  821               app(F,E)),
  822   tense(ng,[],Att2-Att3,TDRS),
  823   Sem = lam(VP,lam(NP,app(TDRS,lam(F,app(NP,lam(X,DRS)))))).
  824
  825semlex_verb(Cat,Sym,Index,Att1-[semtag:'EXS'|Att3],Sem):- 
  826   Cat = (s:Mood\np)/(s:Arg\np), \+ Mood = Arg,
  827   roles(Sym,Cat,[Role2,Role1],Att1-Att2), !,
  828   plosing(CC),
  829   att(Att2,sense,Sense),
  830   DRS = merge(B:drs([B:[]:E,
  831                      B:[]:K],
  832                     [B:Index:pred(E,Sym,v,Sense),
  833                      B:[]:role(E,X,Role1,1),
  834                      B:[]:role(E,K,Role2,1),
  835                      B:[]:prop(K,app(app(VP,lam(P,app(P,X))),CC))]),
  836               app(F,E)),
  837   tense(Mood,[],Att2-Att3,TDRS),
  838   Sem = lam(VP,lam(NP,app(TDRS,lam(F,app(NP,lam(X,DRS)))))).
  839
  840
  841/* -------------------------------------------------------------------------
  842   Subject Control Verbs
  843------------------------------------------------------------------------- */
  844
  845semlex_verb(Cat,Sym,Index,Att1-[semtag:'EXS'|Att3],Sem):-
  846   member(Sym,[promise,offer,use]),
  847   Cat = ((s:Mood\np)/(s:to\np))/np, \+ Mood = to,
  848   roles(Sym,((s:Mood\np)/np)/np,[Role3,Role2,Role1],Att1-Att2), !,
  849   att(Att2,sense,Sense),
  850   DRS = app(app(V,lam(P,app(P,X))),lam(Z,merge(B1:drs([B1:[]:E],
  851                                                       [B1:Index:pred(E,Sym,v,Sense),
  852                                                        B1:[]:role(E,X,Role1,1),
  853                                                        B1:[]:role(E,Y,Role3,1),
  854                                                        B1:[]:role(E,Z,Role2,1)]),app(F,E)))),
  855   tense(Mood,[],Att2-Att3,TDRS),
  856   Sem = lam(Q2,lam(V,lam(Q1,app(TDRS,lam(F,app(Q1,lam(X,app(Q2,lam(Y,DRS))))))))).
  857
  858semlex_verb(((s:Mood\np)/(s:Com\np))/np,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  859   member(Sym,[promise,offer,use]),
  860   member(Com,[b,ng,adj,pss,pt]), 
  861   roles(Sym,((s:Mood\np)/s:_)/np,[Role3,Role2,Role1],Att1-Att2), !,
  862   plosing(CC),
  863   att(Att2,sense,Sense),
  864   Modal = B1:drs([B1:[]:A],
  865                  [B1:[]:role(E,A,Role3,1),
  866                   B1:[]:prop(A,app(app(V,lam(R,app(R,X))),CC))]),
  867   DRS = merge(B2:drs([B2:[]:E],
  868                      [B2:Index:pred(E,Sym,v,Sense),
  869                       B2:[]:role(E,Y,Role2,1),
  870                       B2:[]:role(E,X,Role1,1)]),
  871               merge(Modal,app(F,E))),
  872   tense(Mood,[],Att2-Att3,TDRS),
  873   Sem = lam(Q2,lam(V,lam(Q1,app(TDRS,lam(F,app(Q1,lam(X,app(Q2,lam(Y,DRS))))))))).
  874
  875
  876/* -------------------------------------------------------------------------
  877   Object Control Verbs (ECM, exceptional case marking)
  878------------------------------------------------------------------------- */
  879
  880semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  881   Cat = ((s:Mood\np)/(s:to\np))/np, \+ Mood = to,
  882   roles(Sym,((s:Mood\np)/s:_)/np,[Role3,Role2,Role1],Att1-Att2), !,
  883   att(Att2,sense,Sense),
  884   DRS = app(app(V,lam(P,app(P,Y))),lam(Z,merge(B1:drs([B1:[]:E],
  885                                                       [B1:Index:pred(E,Sym,v,Sense),
  886                                                        B1:[]:role(E,X,Role1,1),
  887                                                        B1:[]:role(E,Y,Role3,1),
  888                                                        B1:[]:role(E,Z,Role2,1)]),app(F,E)))),
  889   tense(Mood,[],Att2-Att3,TDRS),
  890   Sem = lam(Q2,lam(V,lam(Q1,app(TDRS,lam(F,app(Q1,lam(X,app(Q2,lam(Y,DRS))))))))).
  891
  892semlex_verb(((s:Mood\np)/(s:Com\np))/np,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  893   member(Com,[b,ng,adj,pss,pt]),
  894   roles(Sym,((s:Mood\np)/s:_)/np,[Role3,Role2,Role1],Att1-Att2), !,
  895   plosing(CC),
  896   att(Att2,sense,Sense),
  897   Modal = B1:drs([B1:[]:A],
  898                  [B1:[]:role(E,A,Role3,1),
  899                   B1:[]:prop(A,app(app(V,lam(R,app(R,Y))),CC))]),
  900   DRS = merge(B1:drs([B1:[]:E],
  901                      [B1:Index:pred(E,Sym,v,Sense),
  902                       B1:[]:role(E,Y,Role2,1),
  903                       B1:[]:role(E,X,Role1,1)]),
  904               merge(Modal,app(F,E))),
  905   tense(Mood,[],Att2-Att3,TDRS),
  906   Sem = lam(Q2,lam(V,lam(Q1,app(TDRS,lam(F,app(Q1,lam(X,app(Q2,lam(Y,DRS))))))))).
  907
  908
  909/* -------------------------------------------------------------------------
  910   Object Control Verbs subcatting PP
  911------------------------------------------------------------------------- */
  912
  913semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  914   Cat = ((s:Mood\np)/(s:to\np))/pp, \+ Mood = to,
  915   roles(Sym,((s:Mood\np)/np)/pp,[Role1,Role2],Att1-Att2), !,
  916   att(Att2,sense,Sense),
  917   DRS = app(app(V,lam(P,app(P,X))),lam(Z,merge(B1:drs([B1:[]:E],
  918                                                       [B1:Index:pred(E,Sym,v,Sense),
  919                                                        B1:[]:role(E,X,Role2,1),
  920                                                        B1:[]:role(E,Z,Role1,1)]),merge(app(PP,E),app(F,E))))),
  921   tense(Mood,[],Att2-Att3,TDRS),
  922   Sem = lam(PP,lam(V,lam(Q,app(TDRS,lam(F,app(Q,lam(X,DRS))))))).
  923                    
  924
  925/* -------------------------------------------------------------------------
  926   make NP ADJ to VP
  927------------------------------------------------------------------------- */
  928
  929semlex_verb(Cat,Sym,Index,Att1-[sem:'EXS'|Att3],Sem):-
  930   Cat = (((s:Mood\np)/(s:to\np))/(s:adj\np))/np, !,
  931   plosing(CC),
  932   att(Att1,sense,Sense),
  933   roles(Sym,((s:Mood\np)/s:_)/np,[Role3,Role2,Role1],Att1-Att2),
  934   Modal = merge(B1:drs([B1:[]:A],
  935                        [B1:[]:role(E,A,Role3,1),
  936                         B1:[]:prop(A,app(app(V,lam(R,app(R,Y))),CC))]),
  937                 app(app(AP,lam(P,app(P,A))),CC)),
  938   DRS = merge(B2:drs([B2:[]:E],
  939                      [B2:Index:pred(E,Sym,v,Sense),
  940                       B2:[]:role(E,Y,Role2,1),
  941                       B2:[]:role(E,X,Role1,1)]),
  942               merge(Modal,app(F,E))),
  943   tense(Mood,[],Att2-Att3,TDRS),
  944   Sem = lam(Q2,lam(AP,lam(V,lam(Q1,app(TDRS,lam(F,app(Q1,lam(X,app(Q2,lam(Y,DRS)))))))))).
  945
  946semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):-
  947   Cat = (((s:Mood\np)/s:_)/(s:adj\np))/np, !,
  948   plosing(CC),
  949   att(Att1,sense,Sense),
  950   roles(Sym,((s:Mood\np)/s:_)/np,[Role3,Role2,Role1],Att1-Att2),
  951   Modal = merge(B1:drs([B1:[]:A],
  952                        [B1:[]:role(E,A,Role3,1),
  953                         B1:[]:prop(A,app(S,CC))]),
  954                 app(app(AP,lam(P,app(P,A))),CC)),
  955   DRS = merge(B1:drs([B1:[]:E],
  956                      [B1:Index:pred(E,Sym,v,Sense),
  957                       B1:[]:role(E,Y,Role2,1),
  958                       B1:[]:role(E,X,Role1,1)]),
  959               merge(Modal,app(F,E))),
  960   tense(Mood,[],Att2-Att3,TDRS),
  961   Sem = lam(Q2,lam(AP,lam(S,lam(Q1,app(TDRS,lam(F,app(Q1,lam(X,app(Q2,lam(Y,DRS)))))))))).
  962
  963
  964
  965/* -------------------------------------------------------------------------
  966   Funny transitive case (rare -- often in incorrect parses)
  967------------------------------------------------------------------------- */
  968
  969semlex_verb(Cat,_Sym,Index,Att1-Att2,Sem):-
  970   Cat = ((s:Mood\np)\np)/(s:Aspect\np), !,
  971   aspect(Aspect,Mood,Index,Att1-Att2,TDRS),
  972   Sem = lam(VP,lam(_,lam(NP,app(TDRS,app(VP,NP))))).
  973
  974
  975/* -------------------------------------------------------------------------
  976   Copula "How ADJ be NP PP"
  977------------------------------------------------------------------------- */
  978
  979semlex_verb(Cat,_Sym,Index,Att1-Att2,Sem):-
  980   Cat = ((s:q/pp)/(s:Aspect\np))/np, !,
  981   aspect(Aspect,q,Index,Att1-Att2,TDRS),
  982   Sem = lam(NP,lam(VP,lam(PP,lam(F,app(app(TDRS,app(VP,NP)),lam(E,merge(app(PP,E),app(F,E)))))))).
  983
  984
  985
  986/* =========================================================================
  987   E x p l e t i v e   v e r b s
  988========================================================================= */
  989
  990/* -------------------------------------------------------------------------
  991   Cleft  "it was NP who VP"
  992------------------------------------------------------------------------- */
  993
  994semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):- 
  995   member(Cat,[((s:Mood\np_exp)/(np\np))/np,
  996               ((s:Mood\np)/(np\np))/np]),
  997   roles(Sym,(s:Mood\np)/np,[Role2,Role1],Att1-Att2), !,
  998   att(Att2,sense,Sense),
  999   DRS = merge(B:drs([B:[]:E],
 1000                     [B:Index:pred(E,Sym,v,Sense),
 1001                      B:[]:role(E,X,Role1,1),
 1002                      B:[]:role(E,Y,Role2,1)]),
 1003               app(P,E)),
 1004   tense(Mood,[],Att2-Att3,TDRS),
 1005   Sem = lam(NP2,lam(RC,lam(NP1,app(TDRS,
 1006                             lam(P,app(NP1,
 1007                                       lam(X,app(app(RC,NP2),
 1008                                                 lam(Y,DRS))))))))).
 1009
 1010
 1011%   Sem = lam(NP,lam(M,lam(_,app(TDRS,lam(F,alfa(fac,merge(B1:drs([B1:[]:X],[]),
 1012%                                                          app(app(M,lam(P,app(P,X))),lam(U,merge(B2:drs([B2:[]:E],[B2:[]:role(E,U,theme,1)]),
 1013%                                                                                                 app(F,E))))),
 1014%                                                    app(NP,lam(U,B3:drs([],[B3:Index:eq(U,X)]))))))))).
 1015
 1016/* -------------------------------------------------------------------------
 1017   Copula  "it is ADJ to-VP"
 1018------------------------------------------------------------------------- */
 1019
 1020semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):-
 1021   Cat = ((s:Mood\np)/(s:to\np))/(s:adj\np), 
 1022   roles(Sym,(s:Mood\np)/s:_,[Role,_],Att1-Att2), !,
 1023   tense(Mood,Index,Att2-Att3,TDRS),
 1024   Sem = lam(AP,lam(VP,lam(NP,app(TDRS,lam(E,DRS))))),
 1025   DRS = app(app(AP,NP), 
 1026             lam(X,app(app(VP,lam(P,merge(B1:drs([B1:[]:X],[]),app(P,X)))),
 1027                       lam(F,merge(B3:drs([],[B3:[]:role(X,F,Role,1)]),app(E,X)))))).
 1028
 1029
 1030/* -------------------------------------------------------------------------
 1031   Copula  "it is so ADJ that S"
 1032           "it is ADJ that S"
 1033           "it is ADJ whether S"
 1034           "it is ADJ for S"
 1035------------------------------------------------------------------------- */
 1036
 1037semlex_verb(Cat,Sym,Index,Att-[sem:'UNK'|Att],Sem):-  
 1038   option('--semantics',amr),
 1039   Cat = ((s:adj\np)/s:em)/(s:adj\np), !,
 1040   Sem = lam(AP,lam(S,lam(Q,lam(E,app(app(AP,Q),lam(Y,merge(app(S,lam(X,B:drs([B:[]:F],[B:[]:pred(F,'cause',v,1),
 1041                                                                                        B:Index:pred(Y,Sym,r,2),
 1042                                                                                        B:[]:role(F,Y,'ARG0',1),  
 1043                                                                                        B:[]:role(F,X,'ARG1',1)]))),
 1044                                                            app(E,Y)))))))).
 1045
 1046semlex_verb(Cat,Sym,Index,Att1-[sem:'IST'|Att2],Sem):-
 1047   Cat = ((s:adj\np)/s:em)/(s:adj\np), !,
 1048   att(Att1,sense,Sense),
 1049   roles(Sym,(s:adj\np)/s:_,[Role,_],Att1-Att2), 
 1050   Sem = lam(AP,lam(S,lam(Q,lam(E,app(app(AP,Q),lam(Y,merge(app(S,lam(X,B2:drs([],[B2:Index:pred(Y,Sym,a,Sense),
 1051                                                                                   B2:[]:role(Y,X,Role,1)]))),
 1052                                                            app(E,Y)))))))).
 1053
 1054semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):-
 1055   member(Cat,[((s:Mood\np_exp)/s:em)/(s:adj\np),
 1056               ((s:Mood\np)/s:em)/(s:adj\np)]), !,
 1057   roles(Sym,(s:Mood\np)/s:_,[Role,_],Att1-Att2), 
 1058   tense(Mood,Index,Att2-Att3,TDRS),
 1059   Sem = lam(AP,lam(S,lam(Q,app(TDRS,lam(E,app(app(AP,Q),lam(Y,merge(app(S,lam(X,B2:drs([],[B2:[]:role(Y,X,Role,1)]))),
 1060                                                                     app(E,Y))))))))).
 1061
 1062semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):-
 1063   member(Cat,[((s:Mood\np_exp)/s:qem)/(s:adj\np),
 1064               ((s:Mood\np)/s:qem)/(s:adj\np)]), !,
 1065   roles(Sym,(s:Mood\np)/s:_,[Role,_],Att1-Att2), 
 1066   tense(Mood,Index,Att2-Att3,TDRS),
 1067   Sem = lam(AP,lam(S,lam(Q,app(TDRS,lam(E,app(app(AP,Q),lam(Y,merge(app(S,lam(X,B2:drs([],[B2:[]:role(Y,X,Role,1)]))),
 1068                                                                     app(E,Y))))))))).
 1069
 1070semlex_verb(Cat,Sym,Index,Att1-Att3,Sem):-
 1071   member(Cat,[((s:Mood\np_exp)/s:for)/(s:adj\np), 
 1072               ((s:Mood\np)/s:for)/(s:adj\np)]), !,
 1073   roles(Sym,(s:Mood\np)/s:_,[Role,_],Att1-Att2), 
 1074   tense(Mood,Index,Att2-Att3,TDRS),
 1075   Sem = lam(AP,lam(S,lam(Q,app(TDRS,lam(E,app(app(AP,Q),lam(Y,merge(app(S,lam(X,B2:drs([],[B2:[]:role(Y,X,Role,1)]))),
 1076                                                                     app(E,Y))))))))).
 1077
 1078
 1079/* -------------------------------------------------------------------------
 1080   Copula  "it is PP that S"
 1081
 1082semlex_verb(Cat,_,_Index,Att-Att,Sem):-
 1083   Cat = ((s:dcl\np_exp)/s:em)/pp, !,
 1084   Sem = lam(PP,lam(S,lam(_,lam(F,app(S,lam(E,merge(app(PP,E),app(F,E)))))))). 
 1085------------------------------------------------------------------------- */
 1086
 1087
 1088/* -------------------------------------------------------------------------
 1089   Copula  "it is NP that S"
 1090
 1091semlex_verb(Cat,_,Index,Att1-Att2,Sem):-
 1092   Cat = ((s:Mood\np_exp)/s:em)/np, !,
 1093   tense(Mood,[],Att1-Att2,TDRS),
 1094   plosing(CC),
 1095   Sem = lam(NP,lam(S,lam(_,app(TDRS,lam(E,merge(B1:drs([B1:Index:F,B1:[]:K],
 1096                                            [B1:[]:role(F,K,theme,1),
 1097                                             B1:[]:prop(K,app(S,CC))]),
 1098                                        merge(app(NP,lam(X,B2:drs([],[B2:[]:eq(X,K)]))),
 1099                                              app(E,F)))))))).
 1100------------------------------------------------------------------------- */
 1101
 1102
 1103/* -------------------------------------------------------------------------
 1104   Control "it takes/makes/is NP to VP" 
 1105
 1106semlex_verb(Cat,_,Index,Att1-Att2,Sem):-
 1107   Cat = ((s:Mood\np_exp)/(s:to\np))/np, !,
 1108   plosing(CC),
 1109   tense(Mood,[],Att1-Att2,TDRS),
 1110   Sem = lam(NP,lam(VP,lam(_,app(TDRS,lam(F,merge(B1:drs([B1:[]:E],
 1111                                             [B1:[]:imp(merge(B2:drs([B2:[]:X],[]),
 1112                                                              app(app(VP,lam(P,app(P,X))),CC)),
 1113                                                        app(NP,lam(Y,B3:drs([],[B3:Index:eq(Y,X)]))))]),
 1114                                         app(F,E))))))).
 1115------------------------------------------------------------------------- */
 1116
 1117
 1118/* -------------------------------------------------------------------------
 1119   Modal "it may/could/would VP"
 1120
 1121semlex_verb(Cat,Sym,Index,Att1-Att2,Sem):-
 1122   option('--modal',true),
 1123   modal_verb(pos,Sym,_),
 1124   Cat = (s:Mood\np_exp)/(s:Aspect\np), !,
 1125   aspect(Aspect,Mood,[],Att1-Att2,TDRS),
 1126   Sem = lam(VP,lam(NP,lam(E,B:drs([],[B:Index:pos(app(app(TDRS,app(VP,NP)),E))])))).
 1127
 1128semlex_verb(Cat,Sym,Index,Att1-Att2,Sem):-
 1129   option('--modal',true),
 1130   Cat = (s:Mood\np_exp)/(s:Aspect\np),
 1131   modal_verb(nec,Sym,Aspect), !,
 1132   aspect(Aspect,Mood,[],Att1-Att2,TDRS),
 1133   Sem = lam(VP,lam(NP,lam(E,B:drs([],[B:Index:nec(app(app(TDRS,app(VP,NP)),E))])))).
 1134
 1135semlex_verb(Cat,_Sym,Index,Att1-Att2,Sem):-
 1136   option('--modal',false),
 1137   Cat = (s:Mood\np_exp)/(s:Aspect\np), !,
 1138   aspect(Aspect,Mood,Index,Att1-Att2,TDRS),
 1139   Sem = lam(VP,lam(NP,lam(E,app(app(TDRS,app(VP,NP)),E)))).
 1140------------------------------------------------------------------------- */
 1141
 1142
 1143/* -------------------------------------------------------------------------
 1144   Comparative "V it COMP (for) S"
 1145
 1146semlex_verb(Cat,Sym,Index,Att-Att,Sem):-
 1147   Cat = (((s:_\np)/s:_)/(s:adj\np))/np_exp, !,
 1148   plosing(CC),
 1149   att(Att,sense,Sense),
 1150   Sem = lam(_,lam(AP,lam(S,lam(NP,lam(F,
 1151         app(NP,lam(X,merge(B1:drs([B1:[]:K,B1:[]:E],
 1152                                   [B1:Index:pred(E,Sym,v,Sense),
 1153                                    B1:[]:role(E,X,agent,1),
 1154                                    B1;[]:role(E,K,theme,1),
 1155                                    B1:[]:prop(K,app(S,CC))]),
 1156                            merge(app(app(AP,lam(P,app(P,K))),lam(G,B2:drs([],[B2:[]:role(E,G,result,1)]))),
 1157                                  app(F,E)))))))))).
 1158------------------------------------------------------------------------- */
 1159
 1160/* -------------------------------------------------------------------------
 1161   Comparative "make/find it COMP to VP"
 1162
 1163semlex_verb(Cat,Sym,Index,Att-Att,Sem):-
 1164   Cat = (((s:_\np)/(s:to\np))/(s:adj\np))/np_exp, !,
 1165   plosing(CC),
 1166   att(Att,sense,Sense),
 1167   DRS = app(app(VP,lam(P,merge(B1:drs([B1:[]:X],[]),app(P,X)))),CC),
 1168   Sem = lam(_,lam(AP,lam(VP,lam(NP,lam(F,
 1169         app(NP,lam(X,merge(B2:drs([B2:[]:K,B2:[]:E],
 1170                                   [B2:Index:pred(E,Sym,v,Sense),
 1171                                    B2:[]:role(E,X,agent,1),
 1172                                    B2:[]:role(E,K,theme,1),
 1173                                    B2:[]:prop(K,DRS)]),
 1174                            merge(app(app(AP,lam(P,app(P,K))),lam(G,B3:drs([],[B3:[]:role(E,G,result,1)]))),
 1175                                  app(F,E)))))))))).
 1176------------------------------------------------------------------------- */
 1177
 1178/* =========================================================================
 1179   Modal Verbs
 1180========================================================================= */
 1181
 1182aux_modal_verb(V):- aux_verb(V).
 1183aux_modal_verb(V):- modal_verb(_,V,_).
 1184
 1185aux_verb(be).
 1186aux_verb(do).
 1187aux_verb(have).
 1188aux_verb(to).
 1189aux_verb(will).
 1190aux_verb(would).
 1191
 1192modal_verb(pos, ca,    _).     %%% can't
 1193modal_verb(pos, can,   _).
 1194modal_verb(pos, may,   _).
 1195modal_verb(pos, might, _).
 1196modal_verb(pos, could, _).
 1197
 1198modal_verb(nec, sha,   _).    %%% shan't
 1199modal_verb(nec, shall, _).
 1200modal_verb(nec, must,  _).
 1201modal_verb(nec, should,_).
 1202modal_verb(nec, have, to).
 1203
 1204%modal_verb(nec, would, _).
 1205%modal_verb(nec, will, _).