
/****************************************************************

 File: ourEngSem_simpliefied.pl

 Patrick Blackburn, 1999.
 Kristina Striegnitz, 2003.

 This file contains the specification of a simple feature-based
 grammar with semantic construction and parse trees.

 This grammar is the same as ourEngSem.pl except that it doesn't
 account for proper names.

 You need a parser/recognizer/generator that declares the following
 operator:

 :- op(700,xfx,--->).
****************************************************************/


%%% phrase structure rules

S     ---> [NP,VP] :-
    S = [cat:s, semF:[sem:NPSem|_], syn:s(NPSyn,VPSyn)|_],
    NP = [cat:np, semF:[sem:NPSem, var:X, scope:VPSem|_], syn:NPSyn|_],
    VP = [cat:vp, semF:[sem:VPSem, arg1:X|_], syn:VPSyn|_].
NP    ---> [Det, N] :-
    NP = [cat:np, semF:[sem:DetSem, var:X, scope:R|_], syn:np(DetSyn,NSyn)|_],
    N = [cat:n, semF:[sem:NSem, arg:X|_], syn:NSyn|_],
    Det = [cat:det, semF:[sem:DetSem, var:X, restr:NSem, scope:R|_], syn:DetSyn|_].
VP    ---> [IV] :-
    VP = [cat:vp, semF:IVSemF, syn:vp(IVSyn)|_],
    IV = [cat:iv, semF:IVSemF, syn:IVSyn|_].
VP    ---> [TV, NP] :-
    VP = [cat:vp, semF:[sem:NPSem, arg1:X|_], syn:vp(TVSyn,NPSyn)|_],
    TV = [cat:tv, semF:[sem:TVSem, arg1:X, arg2:Y|_], syn:TVSyn|_],
    NP = [cat:np, semF:[sem:NPSem, var:Y, scope:TVSem|_], syn:NPSyn|_].


%%% lexical rules

%%% determiner
lex(a,Det) :- Det = [cat:det, semF:[sem:exists(X,R,S), var:X, restr:R, scope:S|_], syn:det(a)|_].
lex(every,Det) :- Det = [cat:det, semF:[sem:forall(X,R,S), var:X, restr:R, scope:S|_], syn:det(every)|_].

%%% common nouns
lex(gun,N) :- N = [cat:n, semF:[sem:gun(X), arg:X|_], syn:n(gun)|_].
lex(robber,N) :- N = [cat:n, semF:[sem:robber(X), arg:X|_], syn:n(robber)|_].
lex(man,N) :- N = [cat:n, semF:[sem:man(X), arg:X|_], syn:n(man)|_].
lex(woman,N) :- N = [cat:n, semF:[sem:woman(X), arg:X|_], syn:n(woman)|_].

%%% verbs
lex(dies,IV) :- IV = [cat:iv, semF:[sem:die(X), arg1:X|_], syn:iv(dies)|_].
lex(dances,IV) :- IV = [cat:iv, semF:[sem:dance(X), arg1:X|_], syn:iv(dances)|_].
lex(loves,TV) :- TV = [cat:tv, semF:[sem:love(X,Y), arg1:X, arg2:Y|_], syn:tv(loves)|_].
lex(shoots,TV) :- TV = [cat:tv, semF:[sem:shoot(X,Y), arg1:X, arg2:Y|_], syn:tv(shoots)|_].


/**********************************************************************
                    That's all, folks!
***********************************************************************/






