1/* @(#)newg.pl	24.1 2/23/88 */
    2
    3/* 
    4	Copyright 1986, Fernando C.N. Pereira and David H.D. Warren,
    5
    6			   All Rights Reserved
    7*/
    8
    9sentence(B,C,D,E,F) :-
   10   declarative(B,C,G,E,H),
   11   terminator(.,G,D,H,F).
   12sentence(B,C,D,E,F) :-
   13   wh_question(B,C,G,E,H),
   14   terminator(?,G,D,H,F).
   15sentence(B,C,D,E,F) :-
   16   topic(C,G,E,H),
   17   wh_question(B,G,I,H,J),
   18   terminator(?,I,D,J,F).
   19sentence(B,C,D,E,F) :-
   20   yn_question(B,C,G,E,H),
   21   terminator(?,G,D,H,F).
   22sentence(B,C,D,E,F) :-
   23   imperative(B,C,G,E,H),
   24   terminator(!,G,D,H,F).
   25
   26
   27pp(B,C,D,E,F,F,G,H) :-
   28   virtual(pp(B,C,D,E),G,H).
   29pp(pp(B,C),D,E,F,G,H,I,J) :-
   30   prep(B,G,K,I,L),
   31   prep_case(M),
   32   np(C,N,M,O,D,E,F,K,H,L,J).
   33
   34
   35topic(B,C,D,x(gap,nonterminal,pp(E,compl,F,G),H)) :-
   36   pp(E,compl,F,G,B,I,D,J),
   37   opt_comma(I,C,J,H).
   38
   39
   40opt_comma(B,C,D,E) :-
   41   ~(',',B,C,D,E).
   42opt_comma(B,B,C,C).
   43
   44
   45declarative(decl(B),C,D,E,F) :-
   46   s(B,G,C,D,E,F).
   47
   48
   49wh_question(whq(B,C),D,E,F,G) :-
   50   variable_q(B,H,I,J,D,K,F,L),
   51   question(I,J,C,K,E,L,G).
   52
   53
   54np(B,C,D,E,F,G,H,I,I,J,K) :-
   55   virtual(np(B,C,D,E,F,G,H),J,K).
   56np(np(B,C,[]),B,D,def,E,F,G,H,I,J,K) :-
   57   is_pp(F),
   58   pers_pron(C,B,L,H,I,J,K),
   59   empty(G),
   60   role(L,decl,D).
   61np(np(B,C,D),B,E,F,G,H,I,J,K,L,M) :-
   62   is_pp(H),
   63   np_head(C,B,F+N,O,D,J,P,L,Q),
   64   np_all(R),
   65   np_compls(N,B,G,O,R,I,P,K,Q,M).
   66np(part(B,C),3+D,E,indef,F,G,H,I,J,K,L) :-
   67   is_pp(G),
   68   determiner(B,D,indef,I,M,K,N),
   69   ~(of,M,O,N,P),
   70   s_all(Q),
   71   prep_case(R),
   72   np(C,3+plu,R,def,F,Q,H,O,J,P,L).
   73
   74
   75variable_q(B,C,D,E,F,G,H,x(gap,nonterminal,np(I,C,E,J,K,L,M),N)) :-
   76   whq(B,C,I,D,F,G,H,N),
   77   do_trace(L,M).
   78variable_q(B,C,compl,D,E,F,G,x(gap,nonterminal,pp(pp(H,I),compl,J,K),L)) :-
   79   prep(H,E,M,G,N),
   80   whq(B,C,I,O,M,F,N,L),
   81   do_trace(J,K),
   82   compl_case(D).
   83variable_q(B,C,compl,D,E,F,G,x(gap,nonterminal,adv_phrase(pp(H,np(C,np_head(int_det(B),[],I),[])),J,K),L)) :-
   84   context_pron(H,I,E,F,G,L),
   85   do_trace(J,K),
   86   verb_case(D).
   87variable_q(B,C,compl,D,E,F,G,x(gap,nonterminal,pred(adj,value(H,wh(B)),I),J)) :-
   88   ~(how,E,K,G,L),
   89   adj(quant,H,K,F,L,J),
   90   empty(I),
   91   verb_case(D).
   92
   93
   94adv_phrase(B,C,D,E,E,F,G) :-
   95   virtual(adv_phrase(B,C,D),F,G).
   96adv_phrase(pp(B,C),D,E,F,G,H,I) :-
   97   loc_pred(B,F,J,H,K),
   98   pp(pp(prep(of),C),compl,D,E,J,G,K,I).
   99
  100
  101pred(B,C,D,E,E,F,G) :-
  102   virtual(pred(B,C,D),F,G).
  103pred(B,C,D,E,F,G,H) :-
  104   adj_phrase(C,D,E,F,G,H).
  105pred(neg,B,C,D,E,F,G) :-
  106   s_all(H),
  107   pp(B,compl,H,C,D,E,F,G).
  108pred(B,C,D,E,F,G,H) :-
  109   s_all(I),
  110   adv_phrase(C,I,D,E,F,G,H).
  111
  112
  113whq(B,C,D,undef,E,F,G,H) :-
  114   int_det(B,C,E,I,G,J),
  115   s_all(K),
  116   np(D,C,L,M,subj,K,N,I,F,J,H).
  117whq(B,3+C,np(3+C,wh(B),[]),D,E,F,G,H) :-
  118   int_pron(D,E,F,G,H).
  119
  120
  121int_det(B,3+C,D,E,F,G) :-
  122   whose(B,C,D,E,F,G).
  123int_det(B,3+C,D,E,F,G) :-
  124   int_art(B,C,D,E,F,G).
  125
  126
  127np_head0(B,C,D,E,E,F,G) :-
  128   virtual(np_head0(B,C,D),F,G).
  129np_head0(name(B),3+sin,def+proper,C,D,E,F) :-
  130   name(B,C,D,E,F).
  131np_head0(np_head(B,C,D),3+E,F+common,G,H,I,J) :-
  132   determiner(B,E,F,G,K,I,L),
  133   adjs(C,K,M,L,N),
  134   noun(D,E,M,H,N,J).
  135np_head0(B,C,def+proper,D,E,F,x(nogap,nonterminal,gen_marker,G)) :-
  136   poss_pron(B,C,D,E,F,G).
  137np_head0(np_head(B,[],C),3+sin,indef+common,D,E,F,G) :-
  138   quantifier_pron(B,C,D,E,F,G).
  139
  140
  141gen_marker(B,B,C,D) :-
  142   virtual(gen_marker,C,D).
  143gen_marker(B,C,D,E) :-
  144   ~('''',B,F,D,G),
  145   an_s(F,C,G,E).
  146
  147
  148whose(B,C,D,E,F,x(nogap,nonterminal,np_head0(wh(B),C,proper),x(nogap,nonterminal,gen_marker,G))) :-
  149   ~(whose,D,E,F,G).
  150
  151
  152question(B,C,D,E,F,G,H) :-
  153   subj_question(B),
  154   role(subj,I,C),
  155   s(D,J,E,F,G,H).
  156question(B,C,D,E,F,G,H) :-
  157   fronted_verb(B,C,E,I,G,J),
  158   s(D,K,I,F,J,H).
  159
  160
  161det(B,C,D,E,E,F,G) :-
  162   virtual(det(B,C,D),F,G).
  163det(det(B),C,D,E,F,G,H) :-
  164   terminal(I,E,F,G,H),
  165   det(I,C,B,D).
  166det(generic,B,generic,C,C,D,D).
  167
  168
  169int_art(B,C,D,E,F,x(nogap,nonterminal,det(G,C,def),H)) :-
  170   int_art(B,C,G,D,E,F,H).
  171
  172
  173subj_question(subj).
  174
  175
  176subj_question(undef).
  177
  178
  179yn_question(q(B),C,D,E,F) :-
  180   fronted_verb(nil,G,C,H,E,I),
  181   s(B,J,H,D,I,F).
  182
  183
  184verb_form(B,C,D,E,F,F,G,H) :-
  185   virtual(verb_form(B,C,D,E),G,H).
  186verb_form(B,C,D,E,F,G,H,I) :-
  187   terminal(J,F,G,H,I),
  188   verb_form(J,B,C,D).
  189
  190
  191neg(B,C,D,D,E,F) :-
  192   virtual(neg(B,C),E,F).
  193neg(aux+B,neg,C,D,E,F) :-
  194   ~(not,C,D,E,F).
  195neg(B,pos,C,C,D,D).
  196
  197
  198fronted_verb(B,C,D,E,F,x(gap,nonterminal,verb_form(G,H,I,J),x(nogap,nonterminal,neg(K,L),M))) :-
  199   verb_form(G,H,I,N,D,O,F,P),
  200   verb_type(G,aux+Q),
  201   role(B,J,C),
  202   neg(R,L,O,E,P,M).
  203
  204
  205imperative(imp(B),C,D,E,F) :-
  206   imperative_verb(C,G,E,H),
  207   s(B,I,G,D,H,F).
  208
  209
  210imperative_verb(B,C,D,x(nogap,terminal,you,x(nogap,nonterminal,verb_form(E,imp+fin,2+sin,main),F))) :-
  211   verb_form(E,inf,G,H,B,C,D,F).
  212
  213
  214s(s(B,C,D,E),F,G,H,I,J) :-
  215   subj(B,K,L,G,M,I,N),
  216   verb(C,K,L,O,M,P,N,Q),
  217   empty(R),
  218   s_all(S),
  219   verb_args(L,O,D,R,T,P,U,Q,V),
  220   minus(S,T,W),
  221   my_plus(S,T,X),
  222   verb_mods(E,W,X,F,U,H,V,J).
  223
  224
  225subj(there,B,C+be,D,E,F,G) :-
  226   ~(there,D,E,F,G).
  227subj(B,C,D,E,F,G,H) :-
  228   s_all(I),
  229   subj_case(J),
  230   np(B,C,J,K,subj,I,L,E,F,G,H).
  231
  232
  233np_head(B,C,D,E,F,G,H,I,J) :-
  234   np_head0(K,L,M,G,N,I,O),
  235   possessive(K,L,M,P,P,B,C,D,E,F,N,H,O,J).
  236
  237
  238np_compls(proper,B,C,[],D,E,F,F,G,G) :-
  239   empty(E).
  240np_compls(common,B,C,D,E,F,G,H,I,J) :-
  241   np_all(K),
  242   np_mods(B,C,L,D,E,M,K,N,G,O,I,P),
  243   relative(B,L,M,N,F,O,H,P,J).
  244
  245
  246possessive(B,C,D,[],E,F,G,H,I,J,K,L,M,N) :-
  247   gen_case(K,O,M,P),
  248   np_head0(Q,R,S,O,T,P,U),
  249   possessive(Q,R,S,V,[pp(poss,np(C,B,E))|V],F,G,H,I,J,T,L,U,N).
  250possessive(B,C,D,E,F,B,C,D,E,F,G,G,H,H).
  251
  252
  253gen_case(B,C,D,x(nogap,terminal,the,E)) :-
  254   gen_marker(B,C,D,E).
  255
  256
  257an_s(B,C,D,E) :-
  258   ~(s,B,C,D,E).
  259an_s(B,B,C,C).
  260
  261
  262determiner(B,C,D,E,F,G,H) :-
  263   det(B,C,D,E,F,G,H).
  264determiner(B,C,D,E,F,G,H) :-
  265   quant_phrase(B,C,D,E,F,G,H).
  266
  267
  268quant_phrase(quant(B,C),D,E,F,G,H,I) :-
  269   quant(B,E,F,J,H,K),
  270   number(C,D,J,G,K,I).
  271
  272
  273quant(B,indef,C,D,E,F) :-
  274   neg_adv(G,B,C,H,E,I),
  275   comp_adv(G,H,J,I,K),
  276   ~(than,J,D,K,F).
  277quant(B,indef,C,D,E,F) :-
  278   ~(at,C,G,E,H),
  279   sup_adv(I,G,D,H,F),
  280   sup_op(I,B).
  281quant(the,def,B,C,D,E) :-
  282   ~(the,B,C,D,E).
  283quant(same,indef,B,B,C,C).
  284
  285
  286neg_adv(B,not+B,C,D,E,F) :-
  287   ~(not,C,D,E,F).
  288neg_adv(B,B,C,C,D,D).
  289
  290
  291sup_op(least,not+less).
  292sup_op(most,not+more).
  293
  294
  295np_mods(B,C,D,[E|F],G,H,I,J,K,L,M,N) :-
  296   np_mod(B,C,E,G,O,K,P,M,Q),
  297   do_trace(R),
  298   my_plus(R,O,S),
  299   minus(G,S,T),
  300   my_plus(O,G,U),
  301   np_mods(B,C,D,F,T,H,U,J,P,L,Q,N).
  302np_mods(B,C,D,D,E,E,F,F,G,G,H,H).
  303
  304
  305np_mod(B,C,D,E,F,G,H,I,J) :-
  306   pp(D,C,E,F,G,H,I,J).
  307np_mod(B,C,D,E,F,G,H,I,J) :-
  308   reduced_relative(B,D,E,F,G,H,I,J).
  309
  310
  311verb_mods([B|C],D,E,F,G,H,I,J) :-
  312   verb_mod(B,D,K,G,L,I,M),
  313   do_trace(N),
  314   my_plus(N,K,O),
  315   minus(D,O,P),
  316   my_plus(K,D,Q),
  317   verb_mods(C,P,Q,F,L,H,M,J).
  318verb_mods([],B,C,C,D,D,E,E).
  319
  320
  321verb_mod(B,C,D,E,F,G,H) :-
  322   adv_phrase(B,C,D,E,F,G,H).
  323verb_mod(B,C,D,E,F,G,H) :-
  324   is_adv(C),
  325   adverb(B,E,F,G,H),
  326   empty(D).
  327verb_mod(B,C,D,E,F,G,H) :-
  328   pp(B,compl,C,D,E,F,G,H).
  329
  330
  331adjs([B|C],D,E,F,G) :-
  332   pre_adj(B,D,H,F,I),
  333   adjs(C,H,E,I,G).
  334adjs([],B,B,C,C).
  335
  336
  337pre_adj(B,C,D,E,F) :-
  338   adj(G,B,C,D,E,F).
  339pre_adj(B,C,D,E,F) :-
  340   sup_phrase(B,C,D,E,F).
  341
  342
  343sup_phrase(sup(most,B),C,D,E,F) :-
  344   sup_adj(B,C,D,E,F).
  345sup_phrase(sup(B,C),D,E,F,G) :-
  346   sup_adv(B,D,I,F,J),
  347   adj(quant,C,I,E,J,G).
  348
  349
  350comp_phrase(comp(B,C,D),E,F,G,H,I) :-
  351   comp(B,C,F,J,H,K),
  352   np_no_do_trace(L),
  353   prep_case(M),
  354   np(D,N,M,O,compl,L,E,J,G,K,I).
  355
  356
  357comp(B,C,D,E,F,G) :-
  358   comp_adv(B,D,H,F,I),
  359   adj(quant,C,H,J,I,K),
  360   ~(than,J,E,K,G).
  361comp(more,B,C,D,E,F) :-
  362   rel_adj(B,C,G,E,H),
  363   ~(than,G,D,H,F).
  364comp(same,B,C,D,E,F) :-
  365   ~(as,C,G,E,H),
  366   adj(quant,B,G,I,H,J),
  367   ~(as,I,D,J,F).
  368
  369
  370relative(B,[C],D,E,F,G,H,I,J) :-
  371   is_pred(D),
  372   rel_conj(B,K,C,F,G,H,I,J).
  373relative(B,[],C,D,D,E,E,F,F).
  374
  375
  376rel_conj(B,C,D,E,F,G,H,I) :-
  377   rel(B,J,K,F,L,H,M),
  378   rel_rest(B,C,J,D,K,E,L,G,M,I).
  379
  380
  381rel_rest(B,C,D,E,F,G,H,I,J,K) :-
  382   conj(C,L,D,M,E,H,N,J,O),
  383   rel_conj(B,L,M,G,N,I,O,K).
  384rel_rest(B,C,D,D,E,E,F,F,G,G).
  385
  386
  387rel(B,rel(C,D),E,F,G,H,I) :-
  388   xopen(F,J,H,K),
  389   variable(B,C,J,L,K,M),
  390   s(D,N,L,O,M,P),
  391   do_trace(Q),
  392   minus(N,Q,E),
  393   close(O,G,P,I).
  394
  395
  396variable(B,C,D,E,F,x(gap,nonterminal,np(np(B,wh(C),[]),B,G,H,I,J,K),L)) :-
  397   ~(that,D,E,F,L),
  398   do_trace(J,K).
  399variable(B,C,D,E,F,x(gap,nonterminal,np(G,H,I,J,K,L,M),N)) :-
  400   wh(C,B,G,H,I,D,E,F,N),
  401   do_trace(L,M).
  402variable(B,C,D,E,F,x(gap,nonterminal,pp(pp(G,H),compl,I,J),K)) :-
  403   prep(G,D,L,F,M),
  404   wh(C,B,H,N,O,L,E,M,K),
  405   do_trace(I,J),
  406   compl_case(O).
  407
  408
  409wh(B,C,np(C,wh(B),[]),C,D,E,F,G,H) :-
  410   rel_pron(I,E,F,G,H),
  411   role(I,decl,D).
  412wh(B,C,np(D,E,[pp(F,G)]),D,H,I,J,K,L) :-
  413   np_head0(E,D,M+common,I,N,K,O),
  414   prep(F,N,P,O,Q),
  415   wh(B,C,G,R,S,P,J,Q,L).
  416wh(B,C,D,E,F,G,H,I,J) :-
  417   whose(B,C,G,K,I,L),
  418   s_all(M),
  419   np(D,E,F,def,subj,M,N,K,H,L,J).
  420
  421
  422reduced_relative(B,C,D,E,F,G,H,I) :-
  423   is_pred(D),
  424   reduced_rel_conj(B,J,C,E,F,G,H,I).
  425
  426
  427reduced_rel_conj(B,C,D,E,F,G,H,I) :-
  428   reduced_rel(B,J,K,F,L,H,M),
  429   reduced_rel_rest(B,C,J,D,K,E,L,G,M,I).
  430
  431
  432reduced_rel_rest(B,C,D,E,F,G,H,I,J,K) :-
  433   conj(C,L,D,M,E,H,N,J,O),
  434   reduced_rel_conj(B,L,M,G,N,I,O,K).
  435reduced_rel_rest(B,C,D,D,E,E,F,F,G,G).
  436
  437
  438reduced_rel(B,reduced_rel(C,D),E,F,G,H,I) :-
  439   xopen(F,J,H,K),
  440   reduced_wh(B,C,J,L,K,M),
  441   s(D,N,L,O,M,P),
  442   do_trace(Q),
  443   minus(N,Q,E),
  444   close(O,G,P,I).
  445
  446
  447reduced_wh(B,C,D,E,F,x(nogap,nonterminal,np(np(B,wh(C),[]),B,G,H,I,J,K),x(nogap,nonterminal,verb_form(be,pres+fin,B,main),x(nogap,nonterminal,neg(L,M),x(nogap,nonterminal,pred(M,N,O),P))))) :-
  448   neg(Q,M,D,R,F,S),
  449   pred(M,N,O,R,E,S,P),
  450   do_trace(J,K),
  451   subj_case(G).
  452reduced_wh(B,C,D,E,F,x(nogap,nonterminal,np(np(B,wh(C),[]),B,G,H,I,J,K),x(nogap,nonterminal,verb(L,M,N,O),P))) :-
  453   participle(L,N,O,D,E,F,P),
  454   do_trace(J,K),
  455   subj_case(G).
  456reduced_wh(B,C,D,E,F,x(nogap,nonterminal,np(G,H,I,J,K,L,M),x(gap,nonterminal,np(np(B,wh(C),[]),B,N,O,P,Q,R),S))) :-
  457   s_all(T),
  458   subj_case(I),
  459   verb_case(N),
  460   np(G,H,U,J,subj,T,V,D,E,F,S),
  461   do_trace(L,M),
  462   do_trace(Q,R).
  463
  464
  465verb(B,C,D,E,F,F,G,H) :-
  466   virtual(verb(B,C,D,E),G,H).
  467verb(verb(B,C,D+fin,E,F),G,H,C,I,J,K,L) :-
  468   verb_form(M,D+fin,G,N,I,O,K,P),
  469   verb_type(M,Q),
  470   neg(Q,F,O,R,P,S),
  471   rest_verb(N,M,B,C,E,R,J,S,L),
  472   verb_type(B,H).
  473
  474
  475rest_verb(aux,have,B,C,[perf|D],E,F,G,H) :-
  476   verb_form(I,past+part,J,K,E,L,G,M),
  477   have(I,B,C,D,L,F,M,H).
  478rest_verb(aux,be,B,C,D,E,F,G,H) :-
  479   verb_form(I,J,K,L,E,M,G,N),
  480   be(J,I,B,C,D,M,F,N,H).
  481rest_verb(aux,do,B,active,[],C,D,E,F) :-
  482   verb_form(B,inf,G,H,C,D,E,F).
  483rest_verb(main,B,B,active,[],C,C,D,D).
  484
  485
  486have(be,B,C,D,E,F,G,H) :-
  487   verb_form(I,J,K,L,E,M,G,N),
  488   be(J,I,B,C,D,M,F,N,H).
  489have(B,B,active,[],C,C,D,D).
  490
  491
  492be(past+part,B,B,passive,[],C,C,D,D).
  493be(pres+part,B,C,D,[prog],E,F,G,H) :-
  494   passive(B,C,D,E,F,G,H).
  495
  496
  497passive(be,B,passive,C,D,E,F) :-
  498   verb_form(B,past+part,G,H,C,D,E,F),
  499   verb_type(B,I),
  500   passive(I).
  501passive(B,B,active,C,C,D,D).
  502
  503
  504participle(verb(B,C,inf,D,E),F,C,G,H,I,J) :-
  505   neg(K,E,G,L,I,M),
  506   verb_form(B,N,O,P,L,H,M,J),
  507   participle(N,C,D),
  508   verb_type(B,F).
  509
  510
  511passive(B+trans).
  512passive(B+ditrans).
  513
  514
  515participle(pres+part,active,[prog]).
  516participle(past+part,passive,[]).
  517
  518
  519close(B,B,C,D) :-
  520   virtual(close,C,D).
  521
  522
  523xopen(B,B,C,x(gap,nonterminal,close,C)).
  524
  525
  526verb_args(B+C,D,E,F,G,H,I,J,K) :-
  527   advs(E,L,M,H,N,J,O),
  528   verb_args(C,D,L,F,G,N,I,O,K).
  529verb_args(trans,active,[arg(dir,B)],C,D,E,F,G,H) :-
  530   verb_arg(np,B,D,E,F,G,H).
  531verb_args(ditrans,B,[arg(C,D)|E],F,G,H,I,J,K) :-
  532   verb_arg(np,D,L,H,M,J,N),
  533   object(C,E,L,G,M,I,N,K).
  534verb_args(be,B,[void],C,C,D,E,F,G) :-
  535   terminal(there,D,E,F,G).
  536verb_args(be,B,[arg(pred,C)],D,E,F,G,H,I) :-
  537   pred_conj(J,C,E,F,G,H,I).
  538verb_args(be,B,[arg(dir,C)],D,E,F,G,H,I) :-
  539   verb_arg(np,C,E,F,G,H,I).
  540verb_args(have,active,[arg(dir,B)],C,D,E,F,G,H) :-
  541   verb_arg(np,B,D,E,F,G,H).
  542verb_args(B,C,[],D,D,E,E,F,F) :-
  543   no_args(B).
  544
  545
  546object(B,C,D,E,F,G,H,I) :-
  547   adv(J),
  548   minus(J,D,K),
  549   advs(C,L,K,F,M,H,N),
  550   obj(B,L,D,E,M,G,N,I).
  551
  552
  553obj(ind,[arg(dir,B)],C,D,E,F,G,H) :-
  554   verb_arg(np,B,D,E,F,G,H).
  555obj(dir,[],B,B,C,C,D,D).
  556
  557
  558pred_conj(B,C,D,E,F,G,H) :-
  559   pred(I,J,K,E,L,G,M),
  560   pred_rest(B,J,C,K,D,L,F,M,H).
  561
  562
  563pred_rest(B,C,D,E,F,G,H,I,J) :-
  564   conj(B,K,C,L,D,G,M,I,N),
  565   pred_conj(K,L,F,M,H,N,J).
  566pred_rest(B,C,C,D,D,E,E,F,F).
  567
  568
  569verb_arg(np,B,C,D,E,F,G) :-
  570   s_all(H),
  571   verb_case(I),
  572   np(B,J,I,K,compl,H,C,D,E,F,G).
  573
  574
  575advs([B|C],D,E,F,G,H,I) :-
  576   is_adv(E),
  577   adverb(B,F,J,H,K),
  578   advs(C,D,E,J,G,K,I).
  579advs(B,B,C,D,D,E,E).
  580
  581
  582adj_phrase(B,C,D,E,F,G) :-
  583   adj(H,B,D,E,F,G),
  584   empty(C).
  585adj_phrase(B,C,D,E,F,G) :-
  586   comp_phrase(B,C,D,E,F,G).
  587
  588
  589no_args(trans).
  590no_args(ditrans).
  591no_args(intrans).
  592
  593
  594conj(conj(B,C),conj(B,D),E,F,conj(B,E,F),G,H,I,J) :-
  595   conj(B,C,D,G,H,I,J).
  596
  597
  598noun(B,C,D,E,F,G) :-
  599   terminal(H,D,E,F,G),
  600   noun_form(H,B,C).
  601
  602
  603adj(B,adj(C),D,E,F,G) :-
  604   terminal(C,D,E,F,G),
  605   adj(C,B).
  606
  607
  608prep(prep(B),C,D,E,F) :-
  609   terminal(B,C,D,E,F),
  610   prep(B).
  611
  612
  613rel_adj(adj(B),C,D,E,F) :-
  614   terminal(G,C,D,E,F),
  615   rel_adj(G,B).
  616
  617
  618sup_adj(adj(B),C,D,E,F) :-
  619   terminal(G,C,D,E,F),
  620   sup_adj(G,B).
  621
  622
  623comp_adv(less,B,C,D,E) :-
  624   ~(less,B,C,D,E).
  625comp_adv(more,B,C,D,E) :-
  626   ~(more,B,C,D,E).
  627
  628
  629sup_adv(least,B,C,D,E) :-
  630   ~(least,B,C,D,E).
  631sup_adv(most,B,C,D,E) :-
  632   ~(most,B,C,D,E).
  633
  634
  635rel_pron(B,C,D,E,F) :-
  636   terminal(G,C,D,E,F),
  637   rel_pron(G,B).
  638
  639
  640name(B,C,D,E,F) :-
  641   opt_the(C,G,E,H),
  642   terminal(B,G,D,H,F),
  643   name(B).
  644
  645
  646int_art(B,plu,quant(same,wh(B)),C,D,E,F) :-
  647   ~(how,C,G,E,H),
  648   ~(many,G,D,H,F).
  649int_art(B,C,D,E,F,G,H) :-
  650   terminal(I,E,F,G,H),
  651   int_art(I,B,C,D).
  652
  653
  654int_pron(B,C,D,E,F) :-
  655   terminal(G,C,D,E,F),
  656   int_pron(G,B).
  657
  658
  659adverb(adv(B),C,D,E,F) :-
  660   terminal(B,C,D,E,F),
  661   adverb(B).
  662
  663
  664poss_pron(pronoun(B),C+D,E,F,G,H) :-
  665   terminal(I,E,F,G,H),
  666   poss_pron(I,B,C,D).
  667
  668
  669pers_pron(pronoun(B),C+D,E,F,G,H,I) :-
  670   terminal(J,F,G,H,I),
  671   pers_pron(J,B,C,D,E).
  672
  673
  674quantifier_pron(B,C,D,E,F,G) :-
  675   terminal(H,D,E,F,G),
  676   quantifier_pron(H,B,C).
  677
  678
  679context_pron(prep(in),place,B,C,D,E) :-
  680   ~(where,B,C,D,E).
  681context_pron(prep(at),time,B,C,D,E) :-
  682   ~(when,B,C,D,E).
  683
  684
  685number(nb(B),C,D,E,F,G) :-
  686   terminal(H,D,E,F,G),
  687   number(H,B,C).
  688
  689
  690terminator(B,C,D,E,F) :-
  691   terminal(G,C,D,E,F),
  692   terminator(G,B).
  693
  694
  695opt_the(B,B,C,C).
  696opt_the(B,C,D,E) :-
  697   ~(the,B,C,D,E).
  698
  699
  700conj(B,list,list,C,D,E,F) :-
  701   terminal(',',C,D,E,F).
  702conj(B,list,end,C,D,E,F) :-
  703   terminal(B,C,D,E,F),
  704   conj(B).
  705
  706
  707loc_pred(B,C,D,E,F) :-
  708   terminal(G,C,D,E,F),
  709   loc_pred(G,B).
  710
  711
  712~(B,C,D,E,F) :-
  713   terminal(B,C,D,E,F),
  714   ~