
signature(signature).


% Grammar Rules

forward rule
(phrase,
 cat:Out)
 ===>
cat> (cat:(f,
	   list:[(Out),(In)])),
cat> (cat:In).


backward rule
(phrase,
 cat:Out)
 ===>
cat> (cat:In),
cat> (cat:(b,
	   list:[(In),(Out)])).



% Lexicon

% Determiners   (T/CN)

a   ---> (word,
	  cat:(f,
	       list:[(t,agr:Agr),(cn,agr:(Agr,
					  num:sg))])).
the ---> (word,
	  cat:(f,
	       list:[(t,agr:Agr),(cn,agr:Agr)])).


% Adjectives     (CN/CN)

big   ---> (word,
	    cat:(f,
	         list:[(cn,agr:Agr),(cn,agr:Agr)])).
green ---> (word,
	    cat:(f,
	         list:[(cn,agr:Agr),(cn,agr:Agr)])).
honest ---> (word,
	     cat:(f,
	          list:[(cn,agr:Agr),(cn,agr:Agr)])).
yellow ---> (word,
	     cat:(f,
	          list:[(cn,agr:Agr),(cn,agr:Agr)])).

% Common Nouns   CN

horse ---> (word,
	    cat:(cn,
		 agr:(num:sg,
		      pers:third))).
horses ---> (word,
	     cat:(cn,
		  agr:(num:pl,
		       pers:third))).
house ---> (word,
	    cat:(cn,
		 agr:(num:sg,
		      pers:third))).
houses ---> (word,
	     cat:(cn,
	 	  agr:(num:pl,
		       pers:third))).
man   ---> (word,
	    cat:(cn,
		 agr:(num:sg,
		      pers:third))).
men   ---> (word,
	    cat:(cn,
		 agr:(num:pl,
		      pers:third))).
sun   ---> (word,
	    cat:(cn,
		 agr:(num:sg,
		      pers:third))).
suns  ---> (word,
	    cat:(cn,
		 agr:(num:pl,
		      pers:third))).


% Proper Names   T

john  ---> (word,
	    cat:(prop_name,
		 agr:(num:sg,
		      pers:third,
		      gen:masc))).
peter ---> (word,
	    cat:(prop_name,
		 agr:(num:sg,
		      pers:third,
		      gen:masc))).

% Pronouns       T

i     ---> (word,
	    cat:(pron,
		 case:nom,
		 agr:(num:sg,
		      pers:first))).

you   ---> (word,
	    cat:(pron,
		 agr:(pers:sec))).

he    ---> (word,
	    cat:(pron,
		 case:nom,
		 agr:(num:sg,
		      pers:third,
		      gen:masc))).
him   ---> (word,
	    cat:(pron,
		 case:acc,
		 agr:(num:sg,
		      pers:third,
		      gen:masc))).

she   ---> (word,
	    cat:(pron,
		 case:nom,
		 agr:(num:sg,
		      pers:third,
		      gen:fem))).
her   ---> (word,
	    cat:(pron,
		 case:acc,
		 agr:(num:sg,
		      pers:third,
		      gen:fem))).

it    ---> (word,
	    cat:(pron,
		 agr:(num:sg,
		      pers:third,
		      gen:neut))).

we    ---> (word,
	    cat:(pron,
		 case:nom,
		 agr:(num:pl,
		      pers:first))).

us    ---> (word,
	    cat:(pron,
		 case:acc,
		 agr:(num:pl,
		      pers:first))).

they  ---> (word,
	    cat:(pron,
		 case:nom,
		 agr:(num:pl,
		      pers:third))).

them  ---> (word,
	    cat:(pron,
		 case:acc,
		 agr:(num:pl,
		      pers:third))).


% Intransitive Verbs  (T\S)

swear  ---> (word,
	    cat:(b,
		 list:[(t,
			case:nom,
			agr:((pers:(first;sec));
			     (num:pl,
			      pers:third))),s])).
swears ---> (word,
	    cat:(b,
		 list:[(t,
			case:nom,
			agr:(num:sg,
			     pers:third)),s])).
walk   ---> (word,
	     cat:(b,
		  list:[(t,
			case:nom,
			agr:((pers:(first;sec));
			     (num:pl,
			      pers:third))),s])).
walks  ---> (word,
	     cat:(b,
		  list:[(t,
			case:nom,
			agr:(num:sg,
			     pers:third)),s])).


% Transitive Verbs     ((T\S)/T)

curse  ---> (word,
	     cat:(f,
		  list:[(b,
			 list:[(t,
			        case:nom,
			        agr:((pers:(first;sec));
			             (num:pl,
			              pers:third))),s]),(t,
				                         case:acc)])).
curses ---> (word,
	     cat:(f,
		  list:[(b,
			 list:[(t,
			        case:nom,
			        agr:(num:sg,
			             pers:third)),s]),(t,
				                       case:acc)])).
eat    ---> (word,
	     cat:(f,
		  list:[(b,
			 list:[(t,
			        case:nom,
			        agr:((pers:(first;sec));
			             (num:pl,
			              pers:third))),s]),(t,
				                         case:acc)])).
eats   ---> (word,
	     cat:(f,
		  list:[(b,
			 list:[(t,
			        case:nom,
			        agr:(num:sg,
			             pers:third)),s]),(t,
				                       case:acc)])).
make   ---> (word,
	     cat:(f,
		  list:[(b,
			 list:[(t,
			        case:nom,
			        agr:((pers:(first;sec));
			             (num:pl,
			              pers:third))),s]),(t,
				                         case:acc)])).
makes  ---> (word,
	     cat:(f,
		  list:[(b,
			 list:[(t,
			        case:nom,
			        agr:(num:sg,
			             pers:third)),s]),(t,
				                       case:acc)])).

% Adjuncts         ((T\S)\(T\S))

quickly ---> (word,
	      cat:(b,
		   list:[(b,
			  list:[(t,
				 agr:Agr,
				 case:Case),s]),(b,
				                 list:[(t,
							agr:Agr,
							case:Case),s])]
	       )).

% English Possessive  (T\(T/CN))

s ---> (word,
	cat:(b,
	     list:[prop_name,(f,
		              list:[(t,
				     agr:Agr,
				     case:Case),(cn,
						 agr:Agr,
						 case:Case)])]
	)).

% Copula (with predicative adjectives)  ((T\S)/(CN/CN))

is ---> (word,
	 cat:(f,
	      list:[(b,
		     list:[(t,
			    agr:(num:sg,
				 pers:third),
			    case:nom),s]),(f,
				           list:[cn,cn])]
	      )
	    ).