
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,cn])).
the ---> (word,
	  cat:(f,
	       list:[t,cn])).


% Adjectives     (CN/CN)

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

% Common Nouns   CN

horse ---> (word,
	    cat:cn).
house ---> (word,
	    cat:cn).
man   ---> (word,
	    cat:cn).
sun   ---> (word,
	    cat:cn).


% Proper Names   T

john  ---> (word,
	    cat:t).
peter ---> (word,
	    cat:t).


% Intransitive Verbs  (T\S)

swears ---> (word,
	    cat:(b,
		 list:[t,s])).
walks  ---> (word,
	     cat:(b,
		  list:[t,s])).


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

curses ---> (word,
	     cat:(f,
		  list:[(b,
			 list:[t,s]),t])).
eats   ---> (word,
	     cat:(f,
		  list:[(b,
			 list:[t,s]),t])).
makes  ---> (word,
	     cat:(f,
		  list:[(b,
			 list:[t,s]),t])).

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

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

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

s ---> (word,
	cat:(b,
	     list:[t,(f,
		      list:[t,cn])]
	)).

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

is ---> (word,
	 cat:(f,
	      list:[(b,
		     list:[t,s]),(f,
				  list:[cn,cn])]
	      )
	    ).