(defun try (phrase) (msg t"~%Trying :~%") (write phrase) (msg t "~%") (let ((result (p phrase))) (msg t "~%") (write result) (msg t "~%"))) (p '() :GRAMMAR 'CT4 :DICTIONARY 'dict4) (msg t "~%Section 1:~%----------~%~%") (try '(POIROT SOLVED THE CASE)) (try '(THE DETECTIVES LOST THEIR GUNS)) (try '(POIROT THOUGHT)) (try '(POIROT SENT THE SOLUTION TO THE POLICE)) (try '(POIROT BELIEVED THE DETECTIVES WERE INCOMPETENT)) (try '(POIROT BELIEVED THAT THE DETECTIVES WERE INCOMPETENT)) (try '(POIROT SOLVED)) (try '(POIROT THOUGHT THE GUN)) (try '(POIROT SENT TO THE POLICE)) (msg t "~%Section 2:~%----------~%~%") (try '(Poirot may solve the case)) (try '(Poirot has solved the case)) (try '(Poirot may have solved the case)) (try '(Poirot is solving the case)) (try '(Poirot may be solving the case)) (try '(Poirot may have been solving the case)) (try '(Poirot has been solving the case)) (try '(Poirot may solved the case)) (try '(Poirot has solve the case)) (try '(Poirot have may solved the case)) (try '(Poirot is solved the case)) (try '(Poirot may have solving the case)) (try '(Poirot may be have solved the case)) (try '(Poirot has solving the case)) (msg t "~%Section 3:~%----------~%~%") (try '(Which case did Poirot solve)) (try '(Who solved the case)) (try '(Which solution did Poirot send to the police)) (try '(Which detectives solved the case)) (try '(Which case did Poirot tell the detectives to solve)) (try '(Which solution did Poirot believe the detectives would send to the police)) (try '(The solution that Poirot sent to the police solved the case)) (try '(The detective that sent the solution to the police solved the case)) (try '(The detective that the police sent the solution to solved the case)) (try '(The solution that Poirot may have sent to the police solved the case)) (try '(The solution Poirot sent to the police solved the case)) (try '(The solution solves the case)) (try '(The solutions solve the case)) (try '(The solution that Poirot sent to the police solves the case)) (try '(The solutions that Poirot sent to the police solve the case)) (try '(The solution solve the case)) (try '(The solutions solves the case)) (try '(The solution that Poirot sent to the police solve the case)) (try '(The solutions that Poirot sent to the police solves the case)) (try '(Which solution did Poirot send the gun to the police)) (try '(Who solved)) (try '(Did Poirot send which solution to the police)) (try '(The solution that Poirot may have sent the gun to the police solved the case)) (try '(The detective sent the solution to the police solved the case))