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

 File: ourEngFeatures.pl

 Patrick Blackburn, 1999.
 Kristina Striegnitz, 2002.

 This file contains the specification of a simple feature-based
 grammar for a fragment of English.

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

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


%%% phrase structure rules

S     ---> [NP,VP] :-
	S = [cat:s|_],
	NP = [cat:np,num:NUM|_],
	VP = [cat:vp,num:NUM|_].

NP    ---> [PN] :-
	NP = [cat:np,num:NUM|_],
	PN = [cat:pn,num:NUM|_].

NP    ---> [Det, Nbar] :-
	NP = [cat:np,num:NUM|_],
	Nbar = [cat:nbar,num:NUM|_],
	Det = [cat:det,num:NUM|_].

Nbar  ---> [N] :-
	Nbar = [cat:nbar,num:NUM|_],
	N = [cat:n,num:NUM|_].

VP    ---> [IV] :-
	VP = [cat:vp,num:NUM|_],
	IV = [cat:iv,num:NUM|_].

VP    ---> [TV, NP] :-
	VP = [cat:vp,num:NUM|_],
	TV = [cat:tv,num:NUM|_],
	NP = [cat:np|_].


%%% lexical rules

%%% proper names
lex(vincent,PN) :- PN = [cat:pn,num:sg|_].
lex(mia,PN) :- PN = [cat:pn,num:sg|_].
lex(marsellus,PN) :- PN = [cat:pn,num:sg|_].
lex(jules,PN) :- PN = [cat:pn,num:sg|_].

%%% determiner (and possesive pronouns)
lex(a,Det) :- Det = [cat:det,num:sg|_].
lex(the,Det) :- Det = [cat:det|_].
lex(her,Det) :- Det = [cat:det|_].
lex(his,Det) :- Det = [cat:det|_].

%%% common nouns
lex(gun,N) :- N = [cat:n,num:sg|_].
lex(guns,N) :- N = [cat:n,num:pl|_].
lex(robber,N) :- N = [cat:n,num:sg|_].
lex(robbers,N) :- N = [cat:n,num:pl|_].
lex(man,N) :- N = [cat:n,num:sg|_].
lex(men,N) :- N = [cat:n,num:pl|_].
lex(woman,N) :- N = [cat:n,num:sg|_].
lex(women,N) :- N = [cat:n,num:pl|_].

%%% verbs
lex(dies,IV) :- IV = [cat:iv,num:sg|_].
lex(die,IV) :- IV = [cat:iv,num:pl|_].
lex(loves,TV) :- TV = [cat:tv,num:sg|_].
lex(love,TV) :- TV = [cat:tv,num:pl|_].
lex(shoots,TV) :- TV = [cat:tv,num:sg|_].
lex(shoot,TV) :- TV = [cat:tv,num:pl|_].


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







