;;; -*- Mode: Lisp; Syntax: Common-Lisp; Base: 10 -*- ;;; GRAMMAR DATA FILE ; Name: SENT1 Type: SENTENCES (add-rule-set 'SENT1 'SENTENCES) (add-rule-list 'SENT1 '((Poirot solved the case) (The detectives lost their guns) (Poirot thought) (Poirot sent the solution to the police) (Poirot believed the detectives were incompetent) (Poirot believed that the detectives were incompetent))) ; Name: LAB3GR Type: CFG (add-rule-set 'LAB3GR 'CFG) (add-rule-list 'LAB3GR '((ROOT ==> S) (S ==> NP VP) (VP ==> VP PP) (VP ==> V0) (VP ==> V1 NP) (VP ==> V2 NP PP) (VP ==> VS SBAR) (PP ==> P PP) (PP ==> P NP) (NP ==> DET N) (NP ==> NP*) (NP ==> ADJ) (NP ==> NP PP) (SBAR ==> COMP S) (SBAR ==> S) )) ; Name: DICT1 Type: DICTIONARY (add-rule-set 'DICT1 'DICTIONARY) (add-rule-list 'DICT1 '( (INTO P) (ABOVE P) (TO P) (IN P) (UP P) (OF P) (WITH P) (FROM P) (THE DET) (AN DET) (A DET) (THEIR DET) (WALK V) (WALKED V) (WALK N) (TALK N) (SHOT N) (GIRL N) (BOY N) (CAR N) (HOUSE N) (STORE N) (STREET N) (TREE N) (WOMAN N) (MAN N) (CAT N) (DOG N) (CASE N) (SAW V1) (SAW V2) (SOLVE V1) (SOLVES V1) (GUN N) (GUNS N) (SOLUTION N) (POLICE N) (DETECTIVE N) (DETECTIVES N) (WORCESTER NP*) (POIROT NP*) (TIMBUCTOU NP*) (ISTANBUL NP*) (INCOMPETENT ADJ) (THAT COMP) (THOUGHT V0) (SENT V2) (LOST V1) (SOLVED V1) (WERE V1) (BELIEVED VS) )) (remove-rule-set 'LAB3G) (create-cfg-table 'LAB3G 'LAB3GR 'root 1) (p '(a man walked up the tree) :GRAMMAR 'LAB3G :DICTIONARY 'DICT1)