;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; ;;;; created 3/28/2004 by clbecker ;;;; last modified 4/16/2004 by clbecker ;;;; ;;;; version history: ;;;; 1.0 K. Erlich ;;;; ;;;; this version has not been tested on any recent demo ;;;; ;;;; ;;;; 2.0 by Justin Del Vecchio ;;;; ;;;; features: ;;;; identified transitivity, as well as member ;;;; and superclass heirarchy of agent and objects ;;;; ;;;; 2.1a by clbecker ;;;; ;;;; upgrades: ;;;; searches for instrument case frame, returns ;;;; it among list of transitivity. ;;;; ;;;; 2.1b by scott napieralski ;;;; ;;;; we haven't determined what modifications were made. ;;;; ;;;; ;;;; 2.1c by M. Sato ;;;; ;;;; upgrades: ;;;; finds additional case frames: ;;;; - properties of the verb ;;;; - superclasses of the verb ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; ;;;; defun_verb ;;;; ;;;; This is the main module of the verb algorithm. ;;;; It executes the following modules in this order: ;;;; ;;;; - construct *Find-List* ;;;; this contains all the paths for items that the algorithm ;;;; will look for and use. ;;;; ;;;; - evaluate *Found-List* ;;;; this executes the find function on the paths in *Find-List* ;;;; with respect to the verb. And stores them in *Found-List* ;;;; ;;;; - execute *ProcessList* ;;;; ;;;; This list contains all the processes that are to be executed, in order ;;;; ;;;; Execute specific modules, such as one that identifies ;;;; reflexive use of the verb from the data in *Found-List* ;;;; Each processing function must be accompanied by a corresponding ;;;; output function that prints the output of the processing function ;;;; in a readable format. ;;;; ;;;; ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; ;;;; Modification History ;;;; ;;;; 4/16/2004 by cb: ;;;; Added a call to evaluateDataProcessingList ;;;; located in the file ConstructFoundLists.cl ;;;; ;;;; ;;;; ;;;; ;;;; ;;;; ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; load all modules here: (load "verbalgorithm3.0/ConstructFindLists") (load "verbalgorithm3.0/ConstructFoundLists") (load "verbalgorithm3.0/Processing") (load "verbalgorithm3.0/Output") ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setf *ProcessList* (list '() )) ;end setf *ProcessList* ;;;;;;;;;;;;; LIST *ProcessList* ;; ;; This is the main "integration thread" of the verb algorithm. ;; All processes are executed from this list in the function defineVerb ;; which is defined below in this file. ;; ;; ;; ;; ALL PROCESSES MUST BE CALLED FROM HERE ;; ;; This keeps all execution centralized and well organized. ;; Additional processes and their corresponding output ;; functions should be added in the following manner: ;; ;; '(output-function (processing-function args)) ;; ;; example: ;; ;; '(print-reflexivity (compute-reflexivity *Found-List*)) ;; ;; (setf *ProcessList* (list ;; call constructFindList ;; this fills in the double association list *Find-List* ;; with the paths to the relations of each argument of ;; the verb. '(constructFindList) ;; call constructArgList ;; this fill the list *ArgList* with all the arguments ;; that are the heads of each association list in *ArgsToFind* '(constructArgList) ;; call constructRelsList ;; this fill the list *RelsList* with all the arguments ;; that are the heads of each association list in *ArgRelsToFind* '(constructRelsList) ;; call constructMiscList ;; this fill the list *MiscList* with all the arguments ;; that are the heads of each association list in *MiscItemsToFind* '(constructMiscList) ;; call constructProcessingDataList ;; this fill the list *ProcessingDataList* with all the arguments ;; that are the heads of each association list in *ProcessingDataToFind* '(constructProcessingDataList) ;; call evaluateFindList ;; this evaluates each path contained in *Find-List* ;; and stores the results in *Found-List* '(evaluateFindList verb) ;; call evaluateDataProcessingList ;; this evaluates each path contained in *ProcessingDataToFind* ;; and stores the results in *ProcessingData* ;; Elements contained in this list are not to be directly ;; outputted, but instead used by the various processing ;; modules. '(evaluateProcessingDataList verb) ;;---------- end data collection ----------------- ;;---------- begin data processing --------------- '(format t "~2% * * * Defining the verb ~A * * * ~1%" verb) '(format t "~2% Arguments of the verb:") ;; print the results of a call to subcategorization-test '(format t "~1% ~T ~A" (subcategorization-test)) '(format t "~2% Transitivity:") ;; print the results of a call to transitivity-match '(format t " ~T ~A ~1%"(transitivity-match (subcategorization-test))) ;; call outputFoundList ;; ;; This outputs all the data in the Found-List ;; organized into a neat output format. '(outputFoundList) ;; call generate-Generalizations ;; ;; This generates a set of generalized sentences ;; based on the data found for each argument of the verb. '(generate-Generalizations) )) ; end setf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Function: defineVerb ;;; ;;; Arguments: ;;; verb ;;; a symbol representing the verb to be defined. ;;; ;;; trace ;;; (optional argument) ;;; an integer with the possible values: ;;; 0 trace off (default) ;;; 1 trace on ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun defineVerb (v &optional (trace 0)) "Initiate the verb algorithm on the verb v." ;; make verb a global variable (setf verb v) ;;EXECUTE PROCESS LIST (loop for process in *ProcessList* do (eval process) ); end loop ) ; end define verb