;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; Double R Model ;; ACT-R 5.0 Language Comprehension Module ;; Jerry T. BAll ;; ;; 24 November 2003 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Double R Model is an ACT-R 5.0 implementation of ;; Double R Theory. Double R Theory consists of ;; Double R Grammar, a linguistic theory of the encoding ;; of Referential and Relational Meaning, and ;; Double R Process, a psycholinguistic theory of ;; the processing of English text into Double R Grammar ;; based representations. ;; This language module provides a framework for the ;; creation of language models covering specific domains ;; ;; It will eventually include sufficient coverage of the ;; grammar of English to support creation of models via ;; ;; (1) the addition of the appropriate vocabulary, ;; (2) an associative network of links between vocabulary items ;; to support lexical disambuation, and ;; (3) a situation model to ground the referents ;; of the referring expressions. ;; ;; The present version implements the basic grammar, ;; but does not yet make use of the associative network ;; or situation model. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Starting the language model ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; The language model runs in the ACT-R 5.0 cognitive modeling ;; environment under Allegro Common Lisp (ACL) 6.2. To start ;; the model, first start ACL then load ACT-R into ACL. After ;; this, start the TCL based "start environment" that comes with ;; ACT-R. Then type "(start-environment)" into the ACL debug window ;; to connect ACT-R to the start environment. From the start ;; environment GUI, click on the "Load Model" button and browse ;; to the location of the "language_model.txt" file. Select this ;; file to load the model. The supporting "lisp_code.cl" file ;; will be loaded automatically. ;; ;; Note: the lisp code file that gets loaded along with ;; the model must be called "lisp_code.cl" and ;; must be in the same directory as the model file ;; to get loaded properly ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Running the language model ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; To run the language module type the following at the debug ;; command prompt: ;; ;; (do-text "") ;; (do-text ". .") ;; (do-text ("" ") ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Sample expressions ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; With the current vocabulary, expressions like the following ;; can be processed: ;; ;; he ;; joe ;; the man ;; the old man ;; the very old man ;; he cried ;; he is crying ;; he is quietly crying ;; he hit the ball ;; he could not have hit the ball ;; he said the man hit the ball ;; he told me he hit the ball ;; to get a feel for how the processor works try processing ;; a text adding one word at a time (followed by "(show-results)") ;; ;; (do-text "the") ;; (do-text "the man") ;; (do-text "the man hit") ;; (do-text "the man hit the") ;; (do-text "the man hit the ball") ;; the file "sample_texts.txt" contains additional sample texts ;; that the language model is capable of processing ;; ;; ;; The following sentence forms are not yet supported: ;; ;; Questions ;; Relative clauses ;; ;; The following other stuff is not yet supported: ;; ;; punctuation (except for periods) ;; capitalization ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Current limitations and potential problems ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; The language model is designed to process any text ;; but doesn't handle punctuation, other than periods. ;; ;; a capitalized word is currently distinct from an uncapitalized word ;; ;; if the model fails to attend to each word in the text ;; then its a bug in the model ;; there are some interactions with the RPM component of ACT-R that ;; can lead to problems in attending to each word ;; or attending to them in the proper order ;; (e.g. going from one line of text to the next) ;; ;; the model may not successfully analyze each word (especially ;; words that are not in the lexicon), but if the model ;; fails and stops, it's a bug, not a feature ;; ;; the "vision-module.lisp" file of the RPM component of ACT-R ;; uses a function called "(chop-string)" that divides text containing ;; a period into separate pieces of text. This function must be modified ;; in order to handle words containing periods (e.g. "e.g.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Double R Grammar Basics ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Lexical Units -- Parts of Speech (POS) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; noun = noun (e.g. "man") ;; pronoun = pronoun (e.g. "he") ;; poss-pron = possessive pronoun (e.g. "my") ;; proper-noun = proper noun (e.g. "joe") ;; verb = verb (e.g. "cry") ;; intrans-verb = intransitive verb ;; (e.g. "run" in "he ran") ;; trans-verb = transitive verb ;; (e.g. "kick" in "He kicked the ball" ;; ditrans-verb = ditransitive verb ;; (e.g. "give" in "He gave me the ball") ;; verb-subj-sitcomp = verb that takes a situation complement ;; (e.g. "believe" in "I believe he likes me") ;; verb-subj-iobj-sitcomp ;; (e.g. "told" in "he told me you like him") ;; verb-subj-iobj-obj-sitcomp ;; (e.g. "bet" in "I bet you $50 they win") ;; adj = adjective (e.g. "sad") ;; prep = preposition (e.g. "on") ;; adv = adverb (e.g. "quickly") ;; det = determiner (e.g. "the, a, this, that") ;; quant = quantifier (e.g. "all, some, one") ;; auxiliary= auxiliary (e.g "is") ;; reg-aux = (non-modal) aux (e.g "is") ;; modal-aux = modal auxiliary (e.g. "could") ;; semi-aux = semi auxiliary (e.g. "seems" in "he seems happy") ;; negative = negative (e.g. "never") ;; not-negative (e.g. "not") ;; inf-mkr = the infinitive marker "to" ;; part = verb particle ;; (e.g. "up" in "he looked up the address") ;; conj = conjunction ;; (e.g. "and" in "the man and the woman") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Phrasal Units Components ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Double R Grammar adopts a modified X-Bar Theory approach ;; to representing the referential/relational structure of input texts ;; there are only two phrasal levels ;; maximal = XP ;; non-maximal = X ;; there is no distinct X' level ;; all maximal phrasal units are referring expressions. ;; ;; the basic referring expressions include: ;; ;; object referring expression -- ORE-- (aka NP) ;; predicate referring expression -- PRE -- (aka Verb Group) ;; situation referring expression -- SRE -- (aka clause) ;; ;; some additional referring expressions include: ;; ;; location referring expression -- LRE -- (aka PP or Adverbial) ;; direction referring expression -- DRE -- (aka PP or Adverbial ;; manner referring expression -- MRE -- (aka PP or adverbial) ;; all referring expressions have the following components ;; spec = specifier ;; mod = modifier (pre-head) ;; head = head ;; post-mod = modifier (post-head) ;; it is the specifier that determines a maximal projection ;; that is, it is the specifier that determines a referring expression ;; in the absence of a specifier, the head may determine a maximal projection ;; some heads (e.g. pronoun, proper noun, deictic words) are inherently referential ;; and do not require a specifier ;; specifiers are pre-head in English ;; modifiers are divided into pre-head and post-head ;; each component of a phrasal unit projects features that combine at the phrasal level ;; the following features are currently included: ;; ;; [obj|rel|sit] -- object or relation or situation (of specifiers and heads) ;; [sing|plural|mass] -- singular or plural or mass (of nouns or heads of OREs) ;; [def|indef] -- definite or indefinite (of specifiers) ;; [fin|inf] -- finite or infinite (of verbs) ;; ;; components may overlap features (e.g. [obj] [rel]) and when they do ;; the feature projection hierarchy determines which feature projects ;; ;; the feature projection hierarchy is ;; specifier > head > modifier ;; if a specifier feature conflicts with a head feature (e.g the[+obj] + kick[+rel]) ;; the specifier feature projects ;; some feature conflicts result in ungrammaticality (e.g. a[+sing] + men[+plural]) ;; if a head feature conflicts with a modifier feature, the head feature projects ;; (e.g. old[+rel] + man[+obj]) ;; note that feature projection is not yet implemented ;; and will eventually include "semantic" features as well ;; all non-maximal phrasal units (i.e X) ;; have the following components ;; note that there is no specifier since specifier result in maximal projections ;; mod = modifier (pre-head) ;; head = head ;; post-mod = modifier (post-head) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Object Refering Expression (obj-refer-expr) Components ;; AKA NP (but head may not be a noun) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; spec = specifier ;; obj-spec = object specifier ;; See obj-spec components below ;; mod = modifier (e.g. attributive adjective, verb participle, noun) ;; head = head ;; obj-head= object head ;; rel-head = relational head ;; post-mod = adverb or pp ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Object Specifier (obj-spec) Components ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; spec = (see head) ;; head = specifier ;; quant = quantifier ;; (e.g. "all" in "all men") ;; det = determiner ;; (e.g. "the" in "the man") ;; mod = modifier ;; quant = quantifier ;; (e.g. "all" in "all the men") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Modifier (mod) Components ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mod = relational modifier (e.g. adverb) ;; head = modifier (e.g. attributive adjective, verb participle, noun) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Predicate Referring Expression (pred) Components ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; spec = specifier ;; pred-spec = predicate specifier ;; (e.g auxiliary, modal aux, negative) ;; see Pred-Spec components ;; mod = modifier (pre-head) ;; pred-mod = predicate modifier ;; (e.g. adverb) ;; head = rel-head = predicate ;; pred = predicate (pred-verb | pred-adj | prep-prep | pred-aux-verb) ;; pred-verb = predicate verb ;; pred-adj = predicate adjective ;; pred-prep = predicate preposition ;; pred-aux-verb = predicate auxiliary verb ;; pred-nominal = predicate nominal (aux verb is "be") ;; post-mod = modifier (post head) ;; (e.g. verb particleadverb or pp) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Predicate Specifier (pred-spec) Components ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; the predicate specifier includes all modal, auxiliary verbs and negatives ;; and any adverb that is embedded within the frame of the specifier ;; the head of the predicate specifier is the first auxiliary or modal auxiliary ;; ;; head = (see first auxiliary or modal auxiliary) ;; mod = relation modifier (e.g adverb embeded within pred-spec ;; "hardly" in "could hardly have been") ;; modal-aux = modal auxiliary (e.g. "could" in "he could be late") ;; aux-1 = first (non-modal) auxiliary (e.g. "is" in "he is late") ;; neg = negative (e.g. "never" in "he is never late") ;; not-negative (e.g. "not" in "he is not late") ;; aux-2 = second (non-modal) auxiliary (e.g. "been" in "he could have been late") ;; aux-3 = third (non-modal) auxiliar (e.g. "being" in "he could not have been being lazy") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Situation Refering Expression (sit-refer-expr) Components ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; subj = subject (obj-refer-expr, sitcomp) ;; mod = relation modifier (e.g. adverb) ;; pred = predicate (pred-refer-expr) ;; obj = object (obj-refer-expr) ;; iobj = indirect object (obj-refer-expr) ;; sitcomp = situation complement (sitcomp) ;; post-mod = relation modifier (e.g. adverb) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Learning from Instruction: ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; The following texts from John Anderson's "Compilation and Instruction" ;; presentation at the ACT-R Post Graduate Summer School 2001 ;; can be processed (at least in part): ;; ;; to do the experiment you are to read the stimulus. ;; associate the stimulus with the response. ;; act on the response and repeat. ;; to associate a response with a stimulus wait and read the response. ;; ;; (do-text "to do the experiment you are to read the stimulus. associate the stimulus with the response. act on the response and repeat. to associate a response with a stimulus wait and read the response.") ;; ;; Note that the representations that get generated can be improved ;; by adding more specialized rules ;; for example a rule to handle "associate X with Y" ;; could take precedence over the generic rule "sit prep obj" ;; which is currently being used ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; start of code ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; lisp_code.cl file management (defvar *lisp-code-file*) (setf *lisp-code-file* (make-pathname :device (pathname-device *load-pathname*) :directory (pathname-directory *load-pathname*) :name "lisp_code")) (defvar *already-loaded-extra-file* nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ACT-R startup ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (clear-all) (pm-reset) (sgp :v t :esc t :rt -1 ;; 1 causes retrieval failures :lf 0 :ga 1 ;; was 0 :bll 0.5 ;; was 0.9 :pm nil :pmt nil :ans .15 ;; .25 causes retrieval failures ) (pm-set-params :real-time t :show-focus t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; chunk types ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; cirular stack ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (chunk-type chunk-stack-chunk this-chunk prev-chunk next-chunk) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; context ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (chunk-type context state rel-context sit-context text-context word prev-word-1 prev-word-2 repeat chunk chunk-stack) ;; state = ;; retrieve-prev-chunk | -- previous chunk has been retrieved ;; process | -- process, default is to retrieve previous chunk ;; add-chunk-to-stack | -- add goal chunk to stack ;; add-chunks-to-stack | -- add goal and retrieval chunks to stack ;; rel-context = (relational context) ;; none | -- no context identified ;; obj | -- object context identified (e.g. following obj-spec) ;; pred | -- predicate context identified (e.g. following pred-spec) ;; sit -- situation context identified ;; (e.g. following conjunction where first conjunct is sit-refer-expr) ;; sit-context = (situation context) ;; decl | -- declarative ;; yes-no-ques | -- yes-no-question ;; wh-ques | -- wh-question ;; imp | -- imperative ;; rel-clause | -- relative clause ;; passive | -- passive declarative ;; text-context = (text context) ;; end-of-text -- end of text ;; word -- current word (used for activation spread) ;; prev-word-1 -- previous word (used for activation spread) ;; prev-word-2 -- word before previous word (used for activation spread) ;; repeat = ;; yes | ;; no ;; chunk -- current chunk ;; chunk-stack -- chunk stack ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; spread activation -- not yet implemented!! ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (chunk-type spread-activation word prev-word-1 prev-word-2 rel-context) ;; rel-context = rel-context from context ;; pick the subtype that has the right number of links!!! (chunk-type word-links word word-2 level) (chunk-type (word-links-3 (:include word-links)) word-3) (chunk-type (word-links-4 (:include word-links-3)) word-4) (chunk-type (word-links-5 (:include word-links-4)) word-5) (chunk-type (word-links-6 (:include word-links-5)) word-6) (chunk-type (word-links-7 (:include word-links-6)) word-7) (chunk-type (word-links-8 (:include word-links-7)) word-8) (chunk-type (word-links-9 (:include word-links-8)) word-9) (chunk-type (word-links-10 (:include word-links-9)) word-10) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; default slot value ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; all slots set to a value -- none is default (not nil) (chunk-type none) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; word chunk types ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (chunk-type word word-form word-marker) ;; separate retrieval for word-info to support spreading activation (chunk-type word-info word-marker word-root word-type word-subtype word-morph-type) ;; not currently being used!!! (chunk-type word-morph-type) (chunk-type (noun-morph-type (:include word-morph-type)) plurality gender person) (chunk-type (verb-morph-type (:include word-morph-type)) tense aspect modality) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; top-type -- ;; all chunks inherit from top-type ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (chunk-type top-type head) ;; all types inherit from top-type ;; all type have a head slot (used in conjunction) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; lex-type ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; parts of speech (chunk-type (lex-type (:include top-type))) (chunk-type (pronoun (:include lex-type))) (chunk-type (poss-pronoun (:include pronoun))) (chunk-type (proper-noun (:include lex-type))) (chunk-type (noun (:include lex-type))) (chunk-type (adjective (:include lex-type))) (chunk-type (verb (:include lex-type)) subtype) (chunk-type (intrans-verb (:include verb))) (chunk-type (trans-verb (:include verb))) (chunk-type (ditrans-verb (:include verb))) (chunk-type (verb-subj-sitcomp (:include verb))) (chunk-type (verb-subj-iobj-sitcomp (:include verb))) (chunk-type (verb-subj-iobj-obj-sitcomp (:include verb))) (chunk-type (preposition (:include lex-type))) (chunk-type (adverb (:include lex-type))) (chunk-type (determiner (:include lex-type))) (chunk-type (quantifier (:include lex-type))) (chunk-type (auxiliary (:include lex-type))) (chunk-type (modal-aux (:include auxiliary))) (chunk-type (reg-aux (:include auxiliary))) (chunk-type (semi-aux (:include auxiliary))) (chunk-type (negative (:include lex-type))) (chunk-type (not-negative (:include negative))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ref-type ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (chunk-type (ref-type (:include top-type))) (chunk-type (head (:include ref-type)) mod post-mod) (chunk-type (obj-head (:include head))) (chunk-type (rel-head (:include head))) (chunk-type (spec (:include ref-type)) mod) ;; "all" in "all the books" = mod of obj-spec (chunk-type (obj-spec (:include spec))) (chunk-type (poss-obj-spec (:include obj-spec)) referent) (chunk-type (quant-obj-spec (:include obj-spec))) ;; not-neg = neg of pred-spec; other neg = mod of pred (chunk-type (pred-spec (:include spec)) modal-aux neg aux-1 aux-2 aux-3) (chunk-type (modifier (:include ref-type)) mod) (chunk-type (obj-mod (:include modifier))) (chunk-type (post-mod (:include modifier))) (chunk-type (rel-mod (:include modifier))) (chunk-type (pred-mod (:include modifier))) ;; "not" is a spec-mod not a pred-spec!!! ;; "never" is a pred-mod, but doesn't take modifiers!!! "simply never" ;; "ever" is a pred-mod, but takes modifiers "hardly ever" (chunk-type (pred-negative (:include pred-mod))) ;; special chunk-type for not!!! (chunk-type (pred-not-negative (:include pred-negative))) ;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; referring expressions ;; ;;;;;;;;;;;;;;;;;;;;;;;;;; (chunk-type (refer-expr (:include top-type)) referent) (chunk-type (obj-refer-expr (:include refer-expr)) spec mod post-mod) (chunk-type (loc-refer-expr (:include refer-expr))) (chunk-type (pred-refer-expr (:include refer-expr)) spec) (chunk-type (sit-refer-expr (:include refer-expr)) mod) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; rel-type ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (chunk-type (rel-type-top (:include top-type))) (chunk-type (obj-type (:include rel-type-top))) ;; [ref,O] (chunk-type (obj-token (:include obj-type)) obj-spec) ;; [ref,obj] (chunk-type (rel-type (:include rel-type-top))) ;; [ref,R] (chunk-type (rel-token (:include rel-type)) pred-spec) ;; [ref,pred] ;; prep-obj = prepositional phrase (chunk-type (prep-obj (:include rel-type)) mod obj) (chunk-type (pred-type (:include rel-type)) subj spec mod post-mod) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; pred-type ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (chunk-type (intrans-pred-type (:include pred-type))) (chunk-type (trans-pred-type (:include pred-type)) obj) (chunk-type (ditrans-pred-type (:include trans-pred-type)) iobj) (chunk-type (sitcomp-pred-type (:include pred-type)) sitcomp) (chunk-type (iobj-sitcomp-pred-type (:include sitcomp-pred-type)) iobj) (chunk-type (iobj-obj-sitcomp-pred-type (:include iobj-sitcomp-pred-type)) obj) (chunk-type (pred-adj (:include intrans-pred-type))) (chunk-type (pred-prep (:include trans-pred-type))) (chunk-type (pred-aux-verb (:include trans-pred-type))) (chunk-type (pred-nominal (:include pred-aux-verb))) (chunk-type (pred-intrans-verb (:include intrans-pred-type))) (chunk-type (pred-trans-verb (:include trans-pred-type))) ;; "gave" in "he gave me it" (chunk-type (pred-ditrans-verb (:include ditrans-pred-type))) ;; "said" in "he said you like me" (chunk-type (pred-verb-subj-sitcomp (:include sitcomp-pred-type))) ;; "told" in "he told me you like me" (chunk-type (pred-verb-subj-iobj-sitcomp (:include iobj-sitcomp-pred-type))) ;; "bet" in "he bet me $50 they win" (chunk-type (pred-verb-subj-iobj-obj-sitcomp (:include iobj-obj-sitcomp-pred-type))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; conjunction ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; conjunctions can conjoin most (if not all) parts of speech ;; support up to 5 conjuncts (chunk-type (conjunction (:include rel-type)) arg-1 arg-n count) (chunk-type (conj-3 (:include conjunction)) arg-2) (chunk-type (conj-4 (:include conj-3)) arg-3) (chunk-type (conj-5 (:include conj-4)) arg-4) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; punctuation ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (chunk-type (punctuation (:include top-type))) (chunk-type (end (:include top-type))) ;; period (chunk-type (end-of-sit (:include end))) (chunk-type (end-of-text (:include end-of-sit))) ;; comma (chunk-type (end-of-obj (:include end))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; end of chunk types!! ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; DECLARATIVE MEMORY ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (add-dm ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; starting goal ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (goal isa word) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; default slot value chunk ;; used instead of nil ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (none isa none) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; circular stack of chunks ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; a stack of chunks is used to represent the ability to "rehearse" a series of chunks ;; the default number of chunks is seven ;; this stack is used as a basis for retrieving the previous chunk from memory (chunk-a isa chunk-stack-chunk this-chunk none prev-chunk chunk-b next-chunk chunk-g) (chunk-b isa chunk-stack-chunk this-chunk none prev-chunk chunk-c next-chunk chunk-a) (chunk-c isa chunk-stack-chunk this-chunk none prev-chunk chunk-d next-chunk chunk-b) (chunk-d isa chunk-stack-chunk this-chunk none prev-chunk chunk-e next-chunk chunk-c) (chunk-e isa chunk-stack-chunk this-chunk none prev-chunk chunk-f next-chunk chunk-d) (chunk-f isa chunk-stack-chunk this-chunk none prev-chunk chunk-g next-chunk chunk-e) (chunk-g isa chunk-stack-chunk this-chunk none prev-chunk chunk-a next-chunk chunk-f) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; context chunk ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; no contextual information is maintained in the goal chunk ;; instead a separate context chunk is used ;; the context chunk contains the chunk-stack and starts out ;; with a pointer to chunk-a (context isa context rel-context none word none prev-word-1 none prev-word-2 none repeat no chunk-stack chunk-a) ;; default rel-context is none ;; default repeat is no ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; word-morph-types - not currently used!!! ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (first-per-sing ISA noun-morph-type person first plurality sing) (first-per-plur ISA noun-morph-type person first plurality plur) (second-per-sing ISA noun-morph-type person second plurality sing) (second-per-plur ISA noun-morph-type person second plurality plur) (third-per-sing ISA noun-morph-type person third plurality sing) (third-per-plur ISA noun-morph-type person third plurality plur) (third-per-mass ISA noun-morph-type person third plurality mass) (pres-part ISA verb-morph-type aspect progressive) (past-part ISA verb-morph-type tense past aspect finite) (infin ISA verb-morph-type aspect infinite) (bare ISA verb-morph-type) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; word-links - not currently used ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (cow-level-1 isa word-links-4 word cow word-2 cows word-3 bull word-4 milk level 1) (cow-level-2 isa word-links-3 word cow word-2 bell word-3 calf level 2) (cows-level-1 isa word-links word cows word-2 cow level 1) (bull-level-1 isa word-links-4 word bull word-2 bulls word-3 cow word-4 horns level 1) (bulls-level-1 isa word-links word bulls word-2 bull level 1) (bell-level-1 isa word-links-4 word bell word-2 bells word-3 cow word-4 church level 1) (bells-level-1 isa word-links word bells word-2 bell level 1) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; lexicon ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; proper nouns - open class ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sample vocabulary (joe-wf isa word word-form "joe" word-marker joe) (joe isa word-info word-marker joe word-root joe word-type proper-noun) (jerry-wf isa word word-form "jerry" word-marker jerry) (jerry isa word-info word-marker jerry word-root jerry word-type proper-noun) (joan-wf isa word word-form "joan" word-marker joan) (joan isa word-info word-marker joan word-root joan word-type proper-noun) (aurora-wf isa word word-form "aurora" word-marker aurora) (aurora isa word-info word-marker aurora word-root aurora word-type proper-noun) ;;;;;;;;;;;;;;; ;; pilot comm (eagle1-wf isa word word-form "eagle1" word-marker eagle1) (eagle1 isa word-info word-marker eagle1 word-root eagle1 word-type proper-noun) (eagle2-wf isa word word-form "eagle2" word-marker eagle2) (eagle2 isa word-info word-marker eagle2 word-root eagle2 word-type proper-noun) (eagle3-wf isa word word-form "eagle3" word-marker eagle3) (eagle3 isa word-info word-marker eagle3 word-root eagle3 word-type proper-noun) (eagle4-wf isa word word-form "eagle4" word-marker eagle4) (eagle4 isa word-info word-marker eagle4 word-root eagle4 word-type proper-noun) (maddog-wf isa word word-form "maddog" word-marker maddog) (maddog isa word-info word-marker maddog word-root maddog word-type proper-noun) (fox-wf isa word word-form "fox" word-marker fox) (fox isa word-info word-marker fox word-root fox word-type proper-noun) ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; nouns - open class ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; spreading activation vocabulary ;; not yet working (cow-wf isa word word-form "cow" word-marker cow) (cow isa word-info word-marker cow word-root cow word-type noun word-morph-type third-per-sing) (cows-wf isa word word-form "cows" word-marker cows) (cows isa word-info word-marker cows word-root cow word-type noun word-morph-type third-per-plur) (milk-wf isa word word-form "milk" word-marker milk) (milk isa word-info word-marker milk word-root milk word-type noun word-morph-type third-per-mass) (bell-wf isa word word-form "bell" word-marker bell) (bell isa word-info word-marker bell word-root bell word-type noun word-morph-type third-per-sing) (bells-wf isa word word-form "bells" word-marker bells) (bells isa word-info word-marker bells word-root bell word-type noun word-morph-type third-per-plur) (bull-wf isa word word-form "bull" word-marker bull) (bull isa word-info word-marker bull word-root bull word-type noun word-morph-type third-per-sing) (bulls-wf isa word word-form "bulls" word-marker bulls) (bulls isa word-info word-marker bulls word-root bull word-type noun word-morph-type third-per-plur) (horn-wf isa word word-form "horn" word-marker horn) (horn isa word-info word-marker horn word-root horn word-type noun word-morph-type third-per-sing) (horns-wf isa word word-form "horns" word-marker horns) (horns isa word-info word-marker horns word-root horn word-type noun word-morph-type third-per-plur) ;;;;;;;;;;;;;;;;;;;;;;; ;; sample vocabulary (man-wf isa word word-form "man" word-marker man) (man isa word-info word-marker man word-root man word-type noun) (men-wf isa word word-form "men" word-marker men) (men isa word-info word-marker men word-root man word-type noun) (woman-wf isa word word-form "woman" word-marker woman) (woman isa word-info word-marker woman word-root woman word-type noun) (women-wf isa word word-form "women" word-marker women) (women isa word-info word-marker women word-root woman word-type noun) (ball-wf isa word word-form "ball" word-marker ball) (ball isa word-info word-marker ball word-type noun) (balls-wf isa word word-form "balls" word-marker balls) (balls isa word-info word-marker balls word-type noun) (bat-wf isa word word-form "bat" word-marker bat) (bat isa word-info word-marker bat word-type noun) (book-wf isa word word-form "book" word-marker book) (book isa word-info word-marker book word-type noun) (books-wf isa word word-form "books" word-marker books) (books isa word-info word-marker books word-type noun) (table-wf isa word word-form "table" word-marker table) (table isa word-info word-marker table word-type noun) (plate-wf isa word word-form "plate" word-marker plate) (plate isa word-info word-marker plate word-type noun) (fence-wf isa word word-form "fence" word-marker fence) (fence isa word-info word-marker fence word-type noun) (stimulus-wf isa word word-form "stimulus" word-marker stimulus) (stimulus isa word-info word-marker stimulus word-type noun) (response-wf isa word word-form "response" word-marker response) (response isa word-info word-marker response word-type noun) (experiment-wf isa word word-form "experiment" word-marker experiment) (experiment isa word-info word-marker experiment word-type noun) ;;;;;;;;;;;;;;;;;; ;; pilot comm (eagle-wf isa word word-form "eagle" word-marker eagle) (eagle isa word-info word-marker eagle word-root eagle word-type noun) (eagles-wf isa word word-form "eagles" word-marker eagles) (eagles isa word-info word-marker eagles word-root eagles word-type noun) (bandit-wf isa word word-form "bandit" word-marker bandit) (bandit isa word-info word-marker bandit word-root bandit word-type noun) (bandits-wf isa word word-form "bandits" word-marker bandits) (bandits isa word-info word-marker bandits word-root bandits word-type noun) (leader-wf isa word word-form "leader" word-marker leader) (leader isa word-info word-marker leader word-root leader word-type noun) (leaders-wf isa word word-form "leaders" word-marker leaders) (leaders isa word-info word-marker leaders word-root leader word-type noun) (trailer-wf isa word word-form "trailer" word-marker trailer) (trailer isa word-info word-marker trailer word-root trailer word-type noun) (trailers-wf isa word word-form "trailers" word-marker trailers) (trailers isa word-info word-marker trailers word-root trailers word-type noun) (pilot-wf isa word word-form "pilot" word-marker pilot) (pilot isa word-info word-marker pilot word-type noun) (group-wf isa word word-form "group" word-marker group) (group isa word-info word-marker group word-root group word-type noun) (groups-wf isa word word-form "groups" word-marker groups) (groups isa word-info word-marker groups word-root group word-type noun) (range-wf isa word word-form "range" word-marker range) (range isa word-info word-marker range word-root range word-type noun) (plan-wf isa word word-form "plan" word-marker plan) (plan isa word-info word-marker plan word-root plan word-type noun) (grinder-wf isa word word-form "grinder" word-marker grinder) (grinder isa word-info word-marker grinder word-root grinder word-type noun) (picture-wf isa word word-form "picture" word-marker picture) (picture isa word-info word-marker picture word-root picture word-type noun) (ship-wf isa word word-form "ship" word-marker ship) (ship isa word-info word-marker ship word-root ship word-type noun) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; verbs - open class ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sample vocabulary (running-wf isa word word-form "running" word-marker running) (running isa word-info word-marker running word-type verb word-root run word-subtype intrans-verb word-morph-type pres-part) (ran-wf isa word word-form "ran" word-marker ran) (ran isa word-info word-marker ran word-type verb word-root run word-subtype intrans-verb word-morph-type pres-part) (runs-wf isa word word-form "runs" word-marker runs) (runs isa word-info word-marker runs word-type verb word-root run word-subtype intrans-verb word-morph-type pres-part) (run-wf isa word word-form "run" word-marker run) (run isa word-info word-marker run word-type verb word-root run word-subtype intrans-verb word-morph-type pres-part) (hit-wf isa word word-form "hit" word-marker hit) (hit isa word-info word-marker hit word-type verb word-root hit word-subtype trans-verb) (hits-wf isa word word-form "hits" word-marker hits) (hits isa word-info word-marker hits word-type verb word-root hit word-subtype trans-verb) (hitting-wf isa word word-form "hitting" word-marker hitting) (hitting isa word-info word-marker hitting word-type verb word-root hit word-subtype trans-verb) (kick-wf isa word word-form "kick" word-marker kick) (kick isa word-info word-marker kick word-type verb word-root kick word-subtype trans-verb) (kicks-wf isa word word-form "kicks" word-marker kicks) (kicks isa word-info word-marker kicks word-type verb word-root kick word-subtype trans-verb) (kicking-wf isa word word-form "kicking" word-marker kicking) (kicking isa word-info word-marker kicking word-type verb word-root kick word-subtype trans-verb) (kicked-wf isa word word-form "kicked" word-marker kicked) (kicked isa word-info word-marker kicked word-type verb word-root kick word-subtype trans-verb) (give-wf isa word word-form "give" word-marker give) (give isa word-info word-marker give word-type verb word-root give word-subtype ditrans-verb) (gives-wf isa word word-form "gives" word-marker gives) (gives isa word-info word-marker gives word-type verb word-root give word-subtype ditrans-verb) (gave-wf isa word word-form "gave" word-marker gave) (gave isa word-info word-marker gave word-type verb word-root give word-subtype ditrans-verb) (giving-wf isa word word-form "giving" word-marker giving) (giving isa word-info word-marker giving word-type verb word-root give word-subtype ditrans-verb) (given-wf isa word word-form "given" word-marker given) (given isa word-info word-marker given word-type verb word-root give word-subtype ditrans-verb) (said-wf isa word word-form "said" word-marker said) (said isa word-info word-marker said word-type verb word-root said word-subtype verb-subj-sitcomp) (believe-wf isa word word-form "believe" word-marker believe) (believe isa word-info word-marker believe word-type verb word-root believe word-subtype verb-subj-sitcomp) (believes-wf isa word word-form "believes" word-marker believes) (believes isa word-info word-marker believes word-type verb word-root believe word-subtype verb-subj-sitcomp) (want-wf isa word word-form "want" word-marker want) (want isa word-info word-marker want word-type verb word-root want word-subtype verb-subj-sitcomp) (told-wf isa word word-form "told" word-marker told) (told isa word-info word-marker told word-type verb word-root tell word-subtype verb-subj-iobj-sitcomp) (read-wf isa word word-form "read" word-marker read) (read isa word-info word-marker read word-type verb word-root read word-subtype trans-verb) (associate-wf isa word word-form "associate" word-marker associate) (associate isa word-info word-marker associate word-type verb word-root associate word-subtype trans-verb) (act-wf isa word word-form "act" word-marker act) (act isa word-info word-marker act word-type verb word-root act word-subtype intrans-verb) (wait-wf isa word word-form "wait" word-marker wait) (wait isa word-info word-marker wait word-type verb word-root wait word-subtype intrans-verb) (repeat-wf isa word word-form "repeat" word-marker repeat) (repeat isa word-info word-marker repeat word-type verb word-root repeat word-subtype trans-verb) (like-wf isa word word-form "like" word-marker like) (like isa word-info word-marker like word-type verb word-root like word-subtype trans-verb) (likes-wf isa word word-form "likes" word-marker likes) (likes isa word-info word-marker likes word-type verb word-root like word-subtype trans-verb) (go-wf isa word word-form "go" word-marker go) (go isa word-info word-marker go word-type verb word-root go word-subtype intrans-verb) (goes-wf isa word word-form "goes" word-marker goes) (goes isa word-info word-marker goes word-type verb word-root go word-subtype intrans-verb) (going-wf isa word word-form "going" word-marker going) (going isa word-info word-marker going word-type verb word-root go word-subtype intrans-verb) (gone-wf isa word word-form "gone" word-marker gone) (gone isa word-info word-marker gone word-type verb word-root go word-subtype intrans-verb) (went-wf isa word word-form "went" word-marker went) (went isa word-info word-marker went word-type verb word-root go word-subtype intrans-verb) (cry-wf isa word word-form "cry" word-marker cry) (cry isa word-info word-marker cry word-type verb word-root cry word-subtype intrans-verb) (cries-wf isa word word-form "cries" word-marker cries) (cries isa word-info word-marker cries word-type verb word-root cry word-subtype intrans-verb) (cried-wf isa word word-form "cried" word-marker cried) (cried isa word-info word-marker cried word-type verb word-root cry word-subtype intrans-verb) (crying-wf isa word word-form "crying" word-marker crying) (crying isa word-info word-marker crying word-type verb word-root cry word-subtype intrans-verb) ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; pilot comm (contact-wf isa word word-form "contact" word-marker contact) (contact isa word-info word-marker contact word-type verb word-root contact word-subtype trans-verb) (engaged-wf isa word word-form "engaged" word-marker engaged) (engaged isa word-info word-marker engaged word-type verb word-root engage word-subtype intrans-verb) (blow-wf isa word word-form "blow" word-marker blow) (blow isa word-info word-marker blow word-type verb word-root blow word-subtype intrans-verb) (showing-wf isa word word-form "showing" word-marker showing) (showing isa word-info word-marker showing word-type verb word-root show word-subtype trans-verb) (cranking-wf isa word word-form "cranking" word-marker cranking) (cranking isa word-info word-marker cranking word-type verb word-root crank word-subtype intrans-verb) (died-wf isa word word-form "died" word-marker died) (died isa word-info word-marker died word-type verb word-root die word-subtype intrans-verb) (abort-wf isa word word-form "abort" word-marker abort) (abort isa word-info word-marker abort word-type verb word-root abort word-subtype intrans-verb) (knock-wf isa word word-form "knock" word-marker knock) (knock isa word-info word-marker knock word-type verb word-root knock word-subtype trans-verb) (climb-wf isa word word-form "climb" word-marker climb) (climb isa word-info word-marker climb word-type verb word-root climb word-subtype intrans-verb) (continue-wf isa word word-form "continue" word-marker continue) (continue isa word-info word-marker continue word-type verb word-root continue word-subtype intrans-verb) (flanking-wf isa word word-form "flanking" word-marker flanking) (flanking isa word-info word-marker flanking word-type verb word-root flank word-subtype trans-verb) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; adjectives - open class ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (same-wf isa word word-form "same" word-marker same) (same isa word-info word-marker same word-type adjective) (hot-wf isa word word-form "hot" word-marker hot) (hot isa word-info word-marker hot word-type adjective) (cold-wf isa word word-form "cold" word-marker cold) (cold isa word-info word-marker cold word-type adjective) (blue-wf isa word word-form "blue" word-marker blue) (blue isa word-info word-marker blue word-type adjective) (red-wf isa word word-form "red" word-marker red) (red isa word-info word-marker red word-type adjective) (old-wf isa word word-form "old" word-marker old) (old isa word-info word-marker old word-type adjective) (sad-wf isa word word-form "sad" word-marker sad) (sad isa word-info word-marker sad word-type adjective) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; pilot comm (southern-wf isa word word-form "southern" word-marker southern) (southern isa word-info word-marker southern word-type adjective) (northern-wf isa word word-form "northern" word-marker northern) (northern isa word-info word-marker northern word-type adjective) (rapid-wf isa word word-form "rapid" word-marker rapid) (rapid isa word-info word-marker rapid word-type adjective) (heavy-wf isa word word-form "heavy" word-marker heavy) (heavy isa word-info word-marker heavy word-type adjective) (light-wf isa word word-form "light" word-marker light) (light isa word-info word-marker light word-type adjective) (tactical-wf isa word word-form "tactical" word-marker tactical) (tactical isa word-info word-marker tactical word-type adjective) (reference-wf isa word word-form "reference" word-marker reference) (reference isa word-info word-marker reference word-root reference word-type adjective) (left-wf isa word word-form "left" word-marker left) (left isa word-info word-marker left word-type adjective) (right-wf isa word word-form "right" word-marker right) (right isa word-info word-marker right word-type adjective) (east-wf isa word word-form "east" word-marker east) (east isa word-info word-marker east word-type adjective) (west-wf isa word word-form "west" word-marker west) (west isa word-info word-marker west word-type adjective) (trail-wf isa word word-form "trail" word-marker trail) (trail isa word-info word-marker trail word-type adjective) (medium-wf isa word word-form "medium" word-marker medium) (medium isa word-info word-marker medium word-type adjective) (split-wf isa word word-form "split" word-marker split) (split isa word-info word-marker split word-type adjective) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; adverbs - open class ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (there-wf isa word word-form "there" word-marker there) (there isa word-info word-marker there word-type adverb) (very-wf isa word word-form "very" word-marker very) (very isa word-info word-marker very word-type adverb) (really-wf isa word word-form "really" word-marker really) (really isa word-info word-marker really word-type adverb) (quickly-wf isa word word-form "quickly" word-marker quickly) (quickly isa word-info word-marker quickly word-type adverb) (rapidly-wf isa word word-form "rapidly" word-marker rapidly) (rapidly isa word-info word-marker rapidly word-type adverb) (quietly-wf isa word word-form "quietly" word-marker quietly) (quietly isa word-info word-marker quietly word-type adverb) (frequently-wf isa word word-form "frequently" word-marker frequently) (frequently isa word-info word-marker frequently word-type adverb) (barely-wf isa word word-form "barely" word-marker barely) (barely isa word-info word-marker barely word-type adverb) (too-wf isa word word-form "too" word-marker too) (too isa word-info word-marker too word-type adverb) (now-wf isa word word-form "now" word-marker now) (now isa word-info word-marker now word-type adverb) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; semi auxiliaries ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;; ;; start (start-wf isa word word-form "start" word-marker start) (start isa word-info word-marker start word-root start word-type semi-aux) (starts-wf isa word word-form "starts" word-marker starts) (starts isa word-info word-marker starts word-root start word-type semi-aux) (started-wf isa word word-form "started" word-marker started) (started isa word-info word-marker started word-root start word-type semi-aux) (starting-wf isa word word-form "starting" word-marker starting) (starting isa word-info word-marker starting word-root start word-type semi-aux) ;;;;;;;;;;;;;;; ;; seem (seem-wf isa word word-form "seem" word-marker seem) (seem isa word-info word-marker seem word-root seem word-type semi-aux) (seems-wf isa word word-form "seems" word-marker seems) (seems isa word-info word-marker seems word-root seem word-type semi-aux) (seemed-wf isa word word-form "seemed" word-marker seemed) (seemed isa word-info word-marker seemed word-root seem word-type semi-aux) (seeming-wf isa word word-form "seeming" word-marker seeming) (seeming isa word-info word-marker seeming word-root seem word-type semi-aux) ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; pronouns - closed class ;;;;;;;;;;;;;;;;;;;;;;;;;;;; (i-wf isa word word-form "i" word-marker i) (i isa word-info word-marker i word-root i word-type pronoun) (me-wf isa word word-form "me" word-marker me) (me isa word-info word-marker me word-root i word-type pronoun) (he-wf isa word word-form "he" word-marker he) (he isa word-info word-marker he word-root he word-type pronoun) (she-wf isa word word-form "she" word-marker she) (she isa word-info word-marker she word-root she word-type pronoun) (him-wf isa word word-form "him" word-marker him) (him isa word-info word-marker him word-root he word-type pronoun) (her-wf isa word word-form "her" word-marker her) (her isa word-info word-marker her word-root she word-type pronoun) (it-wf isa word word-form "it" word-marker it) (it isa word-info word-marker it word-root it word-type pronoun) (you-wf isa word word-form "you" word-marker you) (you isa word-info word-marker you word-root you word-type pronoun) (they-wf isa word word-form "they" word-marker they) (they isa word-info word-marker they word-root they word-type pronoun) (them-wf isa word word-form "them" word-marker them) (them isa word-info word-marker them word-root them word-type pronoun) (my-wf isa word word-form "my" word-marker my) (my isa word-info word-marker my word-root my word-type poss-pronoun) (his-wf isa word word-form "his" word-marker his) (his isa word-info word-marker his word-root his word-type poss-pronoun) #| ;; can't handle ambiguity with regular pronoun yet (her-wf isa word word-form "her" word-marker her) (her-poss isa word-info word-marker her word-root her word-type poss-pronoun) |# (your-wf isa word word-form "your" word-marker your) (your isa word-info word-marker your word-root your word-type poss-pronoun) (their-wf isa word word-form "their" word-marker their) (their isa word-info word-marker their word-root their word-type poss-pronoun) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; auxiliaries - closed class ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; note: reg-aux and semi-aux (but not modal-aux) ;; can function as pred as well as pred-spec (is-aux-wf isa word word-form "is" word-marker is) (is-aux isa word-info word-marker is word-root be word-type reg-aux) (am-aux-wf isa word word-form "am" word-marker am) (am-aux isa word-info word-marker am word-root be word-type reg-aux) (are-aux-wf isa word word-form "are" word-marker are) (are-aux isa word-info word-marker are word-root be word-type reg-aux) (be-aux-wf isa word word-form "be" word-marker be) (be-aux isa word-info word-marker be word-root be word-type reg-aux) (been-aux-wf isa word word-form "been" word-marker been) (been-aux isa word-info word-marker been word-root be word-type reg-aux) (being-aux-wf isa word word-form "being" word-marker being) (being-aux isa word-info word-marker being word-root be word-type reg-aux) ;;;;;;;;;;;;;;;;; ;; have (have-aux-wf isa word word-form "have" word-marker have) (have-aux isa word-info word-marker have word-root have word-type reg-aux) (has-aux-wf isa word word-form "has" word-marker has) (has-aux isa word-info word-marker has word-root have word-type reg-aux) (having-aux-wf isa word word-form "having" word-marker having) (having-aux isa word-info word-marker having word-root have word-type reg-aux) (had-aux-wf isa word word-form "had" word-marker had) (had-aux isa word-info word-marker had word-root have word-type reg-aux) ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; do (do-aux-wf isa word word-form "do" word-marker do) (do-aux isa word-info word-marker do word-root do word-type reg-aux) (does-aux-wf isa word word-form "does" word-marker does) (does-aux isa word-info word-marker does word-root do word-type reg-aux) (doing-aux-wf isa word word-form "doing" word-marker doing) (doing-aux isa word-info word-marker doing word-root do word-type reg-aux) (did-aux-wf isa word word-form "did" word-marker did) (did-aux isa word-info word-marker did word-root do word-type reg-aux) (done-aux-wf isa word word-form "done" word-marker done) (done-aux isa word-info word-marker done word-root do word-type reg-aux) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; modal auxiliaries - closed class ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (could-wf isa word word-form "could" word-marker could) (could isa word-info word-marker could word-root could word-type modal-aux) (would-wf isa word word-form "would" word-marker would) (would isa word-info word-marker would word-root would word-type modal-aux) (should-wf isa word word-form "should" word-marker should) (should isa word-info word-marker should word-root should word-type modal-aux) (might-wf isa word word-form "might" word-marker might) (might isa word-info word-marker mignt word-root might word-type modal-aux) (may-wf isa word word-form "may" word-marker may) (may isa word-info word-marker may word-root may word-type modal-aux) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; prepositions - closed class ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (of-wf isa word word-form "of" word-marker of) (of isa word-info word-marker of word-type preposition) (from-wf isa word word-form "from" word-marker from) (from isa word-info word-marker from word-type preposition) (off-wf isa word word-form "off" word-marker off) (off isa word-info word-marker off word-type preposition) (on-wf isa word word-form "on" word-marker on) (on isa word-info word-marker on word-type preposition) (with-wf isa word word-form "with" word-marker with) (with isa word-info word-marker with word-type preposition) (over-wf isa word word-form "over" word-marker over) (over isa word-info word-marker over word-type preposition) (at-wf isa word word-form "at" word-marker at) (at isa word-info word-marker at word-type preposition) (to-wf isa word word-form "to" word-marker to) (to isa word-info word-marker to word-type preposition) ;;;;;;;;;;;;;;;;;;;;;;;; ;; pilot comm (sw-wf isa word word-form "sw" word-marker sw) (sw isa word-info word-marker sw word-type preposition) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; conjunctions - closed class ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (and-wf isa word word-form "and" word-marker and) (and isa word-info word-marker and word-type conjunction) (or-wf isa word word-form "or" word-marker or) (or isa word-info word-marker or word-type conjunction) (but-wf isa word word-form "but" word-marker but) (but isa word-info word-marker but word-type conjunction) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; determiners - closed class ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (the-wf isa word word-form "the" word-marker the) (the isa word-info word-marker the word-type determiner) (this-wf isa word word-form "this" word-marker this) (this isa word-info word-marker this word-type determiner) (that-wf isa word word-form "that" word-marker that) (that isa word-info word-marker that word-type determiner) (those-wf isa word word-form "those" word-marker those) (those isa word-info word-marker those word-type determiner) (these-wf isa word word-form "these" word-marker these) (these isa word-info word-marker these word-type determiner) (a-wf isa word word-form "a" word-marker a) (a isa word-info word-marker a word-type determiner) (an-wf isa word word-form "an" word-marker an) (an isa word-info word-marker an word-type determiner) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; quantifiers - open class (number quantifiers) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (all-wf isa word word-form "all" word-marker all) (all isa word-info word-marker all word-type quantifier) (some-wf isa word word-form "some" word-marker some) (some isa word-info word-marker some word-type quantifier) (each-wf isa word word-form "each" word-marker each) (each isa word-info word-marker each word-type quantifier) (every-wf isa word word-form "every" word-marker every) (every isa word-info word-marker every word-type quantifier) (both-wf isa word word-form "both" word-marker both) (both isa word-info word-marker both word-type quantifier) (one-wf isa word word-form "one" word-marker one) (one isa word-info word-marker one word-root one word-type quantifier) (no-wf isa word word-form "no" word-marker no) (no isa word-info word-marker no word-type quantifier) ;; also an adverb "he is only five" ;; and "only one book" ;; also a modifier "the only one" (only-wf isa word word-form "only" word-marker only) (only isa word-info word-marker only word-type quantifier) ;; note that none (i.e. "no one") ;; functions exclusively as a pronoun!!! (none1-wf isa word word-form "none" word-marker none) (none1 isa word-info word-marker none word-type pronoun) ;; consider treating numbers as quantifiers ;; that can be pronominalized like "all" ;; "one has the leader" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; number quantifiers - open class ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; these are probably better treated as quantifiers ;; that can be pronominalized!!! ;; especially since they provide specification ;; e.g. "one book" (1-wf isa word word-form "1" word-marker 1) (1 isa word-info word-marker 1 word-root 1 word-type quantifier) (2-wf isa word word-form "2" word-marker 2) (2 isa word-info word-marker 2 word-root 2 word-type quantifier) (3-wf isa word word-form "3" word-marker 3) (3 isa word-info word-marker 3 word-root 3 word-type quantifier) (4-wf isa word word-form "4" word-marker 4) (4 isa word-info word-marker 4 word-root 4 word-type quantifier) ;; note "one" is listed above (two-wf isa word word-form "two" word-marker two) (two isa word-info word-marker two word-root two word-type quantifier) (three-wf isa word word-form "three" word-marker three) (three isa word-info word-marker three word-root three word-type quantifier) (360-wf isa word word-form "360" word-marker 360) (360 isa word-info word-marker 360 word-root 360 word-type quantifier) (340-wf isa word word-form "340" word-marker 340) (340 isa word-info word-marker 340 word-root 340 word-type quantifier) (180-wf isa word word-form "180" word-marker 180) (180 isa word-info word-marker 180 word-root 180 word-type quantifier) (10000-wf isa word word-form "10000" word-marker 10000) (10000 isa word-info word-marker 10000 word-root 10000 word-type quantifier) (15000-wf isa word word-form "15000" word-marker 15000) (15000 isa word-info word-marker 15000 word-root 15000 word-type quantifier) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; negatives - closed class ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (not-wf isa word word-form "not" word-marker not) (not isa word-info word-marker not word-type not-negative) (never-wf isa word word-form "never" word-marker never) (never isa word-info word-marker never word-type negative) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; punctuation - closed class? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (period-wf isa word word-form "." word-marker period) (period isa word-info word-marker period word-root period word-type period) (comma-wf isa word word-form "," word-marker comma) (comma isa word-info word-marker comma word-root comma word-type comma) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; end dm ;;\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ ;; end dm ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; PRODUCTIONS ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; HOUSEKEEPING PRODUCTIONS ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (p cycle =goal> ISA word =context> ISA context state nil ==> =context> state start-first !eval! (re-display-window) ) ;; housekeeping only!!! (spp cycle :effort 0.0) ;; add goal chunk to stack (p add-chunk-to-stack =goal> ISA top-type =context> ISA context state add-chunk-to-stack chunk-stack =chunk-stack =chunk-stack> ISA chunk-stack-chunk next-chunk =next-chunk =next-chunk> ISA chunk-stack-chunk ==> =next-chunk> this-chunk =goal =context> chunk-stack =next-chunk state start +goal> ISA word ) ;; housekeeping only! (spp add-chunk-to-stack :effort 0.0) ;; add retrieval and goal chunk to stack (p add-chunks-to-stack--option-1 =goal> ISA top-type =retrieval> ISA top-type =context> ISA context state add-chunks-to-stack chunk-stack =chunk-stack =chunk-stack> ISA chunk-stack-chunk next-chunk =next-chunk =next-chunk> ISA chunk-stack-chunk ==> =next-chunk> this-chunk =retrieval =context> chunk =goal chunk-stack =next-chunk state add-chunk-to-stack ) ;; housekeeping only! (spp add-chunks-to-stack--option-1 :effort 0.0) ;; retrieval = none (should this be error???) ;; just add goal chunk to stack (p add-chunks-to-stack--option-2 =goal> ISA top-type =retrieval> ISA none =context> ISA context state add-chunks-to-stack ==> =context> state add-chunk-to-stack ) ;; housekeeping only! (spp add-chunks-to-stack--option-2 :effort 0.0) ;; add goal chunk before retrieval chunk to stack ;; need this when goal must be used to convert ;; retrieval buffer before adding to stack (p add-reverse-chunks-to-stack =goal> ISA top-type =retrieval> ISA top-type =context> ISA context state add-reverse-chunks-to-stack chunk-stack =chunk-stack =chunk-stack> ISA chunk-stack-chunk next-chunk =next-chunk =next-chunk> ISA chunk-stack-chunk ==> =next-chunk> this-chunk =goal =context> chunk-stack =next-chunk state add-chunk-to-stack +goal> =retrieval ) ;; housekeeping only! (spp add-reverse-chunks-to-stack :effort 0.0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; find-attend-encode ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (p read-first-word =goal> ISA word =context> ISA context state start-first ==> =context> state find-first ) (p find-first-word =goal> ISA word =context> ISA context state find-first ==> +visual-location> ISA visual-location screen-y lowest screen-x lowest =context> state attend ) (p read-next-word =goal> ISA word =context> ISA context state start - repeat no-more ;; no more words ==> =context> state find ) (p find-next-word-step-1-option-1 =goal> ISA word =context> ISA context state find ==> +visual-location> ISA visual-location screen-x greater-than-current screen-y current nearest current =context> state attend repeat no ) (p find-next-word-step-1-option-2 =goal> ISA word =context> ISA context state find ==> +visual-location> ISA visual-location screen-y greater-than-current screen-x lowest =context> state attend repeat no ) ;; only repeat this once!!! (p attend-word-option-1--error-retrieved =goal> ISA word =context> ISA context state attend - repeat yes =visual-location> isa error ==> +visual-location> ISA visual-location screen-y greater-than-current screen-x lowest =context> state attend repeat yes ) ;; treat like end-of-sit (p attend-word-option-2--error-retrieved-again =goal> ISA word =context> ISA context state attend repeat yes =visual-location> isa error ==> +goal> ISA end-of-sit =context> state process repeat no-more ) (p attend-word-option-2--location-retrieved =goal> ISA word =context> ISA context state attend =visual-location> ISA visual-location =visual-state> ISA module-state modality free ==> +visual> ISA visual-object screen-pos =visual-location =context> state encode ) ;; strings don't spread activation!!! ;; need word-marker not word-form ;; need to do this after word form is recognized (p encode-word-form =goal> ISA word =context> ISA context state encode word =word prev-word-1 =prev-word-1 prev-word-2 =prev-word-2 =visual> ISA text value =current-word ==> +retrieval> ISA word word-form =current-word =context> state retrieve-word-marker prev-word-1 =word prev-word-2 =prev-word-1 ) ;; should this take time ;; or is it a conversion that shouldn't take time (p retrieve-word-marker--option-1--marker-retrieved =goal> ISA word =context> ISA context state retrieve-word-marker prev-word-1 =word-1 prev-word-2 =word-2 rel-context =rel-context =retrieval> ISA word word-form =word-form word-marker =word-marker ==> +goal> ISA spread-activation word =word-marker prev-word-1 =word-1 ;; use for retrieving multi-word units (eventually) prev-word-2 =word-2 ;; use for retrieving multi-word units (eventually) rel-context =rel-context =context> state spread-activation word =word-marker ) ;; just ignore word for now!!! (p retrieve-word-marker--option-2--no-marker-retrieved =goal> ISA word =context> ISA context state retrieve-word-marker =retrieval> ISA error ==> =context> state start ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; SPREAD ACTIVATION PRODUCTIONS ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; context should influence which version of word ;; gets retrieved. context needs to be in goal to do this ;; since priming comes from goal slots... ;; may want to have a series of 0 time to execute productions ;; to effect spreading activation ;; then do retrieval!!! ;; is 1 spread-activation enough??? ;; what should be basis of spread??? (p spread-activation =goal> ISA spread-activation =context> ISA context state spread-activation word =word-marker ==> =context> state spread-activation--retrieve-links-level-1 +retrieval> ISA word-links word =word-marker level 1 ) ;; housekeeping only!!! (spp spread-activation :effort 0.0) (p spread-activation--word-links-level-1-retrieved =goal> ISA spread-activation =context> ISA context state spread-activation--retrieve-links-level-1 word =word-marker =retrieval> ISA word-links level 1 ==> +goal> =retrieval +retrieval> ISA word-links word =word-marker level 2 =context> state spread-activation--retrieve-links-level-2 ) ;; housekeeping only!!! (spp spread-activation--word-links-level-1-retrieved :effort 0.0) ;; no word-links-1 (p spread-activation--no-word-links-level-1 =goal> ISA spread-activation =context> ISA context state spread-activation--retrieve-links-level-1 word =word-marker =retrieval> ISA error ==> +goal> ISA word word-marker =word-marker =context> state retrieve ) ;; housekeeping only!!! (spp spread-activation--no-word-links-level-1 :effort 0.0) (p spread-activation--word-links-level-2-retrieved =goal> ISA word-links level 1 =context> ISA context state spread-activation--retrieve-links-level-2 word =word-marker =retrieval> ISA word-links level 2 ==> +goal> =retrieval +retrieval> ISA word-links word =word-marker level 3 =context> state spread-activation--retrieve-links-level-3 ) ;; housekeeping only!!! (spp spread-activation--word-links-level-2-retrieved :effort 0.0) ;; no word-links-2 (p spread-activation--no-word-links-level-2 =goal> ISA word-links level 1 =context> ISA context state spread-activation--retrieve-links-level-2 word =word-marker =retrieval> ISA error ==> +goal> ISA word word-marker =word-marker =context> state retrieve ) ;; housekeeping only!!! (spp spread-activation--no-word-links-level-2 :effort 0.0) (p spread-activation--word-links-level-3-retrieved =goal> ISA word-links level 2 =context> ISA context state spread-activation--retrieve-links-level-3 word =word-marker =retrieval> ISA word-links level 3 ==> +goal> =retrieval =context> state spread-activation--retrieve-links-level-3-retrieved ) ;; housekeeping only!!! (spp spread-activation--word-links-level-3-retrieved :effort 0.0) ;; no word-links level 3 (p spread-activation--no-word-links-level-3 =goal> ISA word-links level 2 =context> ISA context state spread-activation--retrieve-links-level-3 word =word-marker =retrieval> ISA error ==> +goal> ISA word word-marker =word-marker =context> state retrieve ) ;; housekeeping only!!! (spp spread-activation--no-word-links-level-2 :effort 0.0) ;; end activation spread (p spread-activation--end =goal> ISA word-links level 3 =context> ISA context state end-spread-activation word =word-marker ==> +goal> ISA word word-marker =word-marker =context> state retrieve ) ;; housekeeping only!!! (spp spread-activation--end :effort 0.0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; retrieve ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; after activation spread do retrieval (p retrieve-word-info =goal> ISA word word-marker =word-marker =context> ISA context state retrieve ==> +retrieval> ISA word-info word-marker =word-marker =context> state retrieve-word-info ) ;; word info retrieved (p retrieve-word-info--option-1--word-info-retrieved =goal> ISA word =context> ISA context state retrieve-word-info =retrieval> ISA word-info ==> +goal> =retrieval =context> state convert ) ;; failed to retrieve word, so continue ;; this shouldn't happen if ;; word-info matches word-marker ;; probably a bug in model (p retrieve-word-info--option-2--no-word-retrieved =goal> ISA word =context> ISA context state retrieve-word-info =retrieval> ISA error ==> =context> state start ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; convert to POS and/or Function ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (p convert-period-to-end-of-sit =goal> ISA word-info word-type period =context> ISA context state convert ==> +goal> ISA end-of-sit =context> state process ) ;;; housekeeping only!!! (spp convert-period-to-end-of-sit :effort 0.0) (p convert-comma-to-end-of-obj =goal> ISA word-info word-type period =context> ISA context state convert ==> +goal> ISA end-of-obj =context> state process ) ;;; housekeeping only!!! (spp convert-comma-to-end-of-obj :effort 0.0) (p convert-word-to-pronoun =goal> ISA word-info word-type pronoun =context> ISA context state convert ==> +goal> ISA pronoun head =goal =context> state convert-pron-to-obj-refer-expr ) ;;; housekeeping only!!! (spp convert-word-to-pronoun :effort 0.0) (p convert-pronoun-to-obj-refer-expr =goal> ISA pronoun =context> ISA context state convert-pron-to-obj-refer-expr ==> +goal> ISA obj-refer-expr spec head mod none head =goal post-mod none referent none-for-now =context> state process ) ;; housekeeping only!!! (spp convert-pronoun-to-obj-refer-expr :effort 0.0) (p convert-word-to-poss-pronoun =goal> ISA word-info word-type poss-pronoun =context> ISA context state convert ==> +goal> ISA poss-pronoun head =goal =context> state convert-poss-pronoun-to-obj-spec ) ;;; housekeeping only!!! (spp convert-word-to-pronoun :effort 0.0) (p convert-poss-pronoun-to-poss-obj-spec =goal> ISA poss-pronoun =context> ISA context state convert-poss-pronoun-to-obj-spec ==> +goal> ISA poss-obj-spec mod none head =goal referent none-for-now =context> state process ) ;; housekeeping only!!! (spp convert-poss-pronoun-to-poss-obj-spec :effort 0.0) (p convert-word-to-proper-noun =goal> ISA word-info word-type proper-noun =context> ISA context state convert ==> +goal> ISA proper-noun head =goal =context> state convert-proper-noun-to-obj-refer-expr ) ;; housekeeping only!!! (spp convert-word-to-proper-noun :effort 0.0) (p convert-proper-noun-to-obj-refer-expr =goal> ISA proper-noun =context> ISA context state convert-proper-noun-to-obj-refer-expr ==> +goal> ISA obj-refer-expr spec head mod none head =goal post-mod none referent none-for-now =context> state process ) ;; housekeeping only!!! (spp convert-proper-noun-to-obj-refer-expr :effort 0.0) (p convert-word-to-noun =goal> ISA word-info word-type noun =context> ISA context state convert ==> +goal> ISA noun head =goal =context> state convert-noun-to-head ) ;; housekeeping only!!! (spp convert-word-to-noun :effort 0.0) (p convert-noun-to-head =goal> ISA noun =context> ISA context state convert-noun-to-head ==> +goal> ISA head mod none head =goal post-mod none =context> state process ) ;; housekeeping only!!! (spp convert-pronoun-to-obj-refer-expr :effort 0.0) (p convert-word-to-determiner =goal> ISA word-info word-type determiner =context> ISA context state convert ==> +goal> ISA determiner head =goal =context> state convert-determiner-to-obj-spec ) ;; housekeeping only!!! (spp convert-word-to-determiner :effort 0.0) (p convert-determiner-to-obj-spec =goal> ISA determiner =context> ISA context state convert-determiner-to-obj-spec ==> +goal> ISA obj-spec mod none head =goal =context> state process ) ;; housekeeping only!!! (spp convert-determiner-to-obj-spec :effort 0.0) (p convert-word-to-quantifier =goal> ISA word-info word-type quantifier =context> ISA context state convert ==> +goal> ISA quantifier head =goal =context> state convert-to-quant-obj-spec ) ;; housekeeping only!!! (spp convert-word-to-quantifier :effort 0.0) ;; assume all quantifiers function as quant-obj-spec ;; subject to subsequent modification, if necessary (p convert-quantifier-to-quant-obj-spec =goal> ISA quantifier =context> ISA context state convert-to-quant-obj-spec ==> +goal> ISA quant-obj-spec mod none head =goal =context> state process ) ;; housekeeping only!!! (spp convert-quantifier-to-quant-obj-spec :effort 0.0) (p convert-word-to-adjective =goal> ISA word-info word-type adjective =context> ISA context state convert ==> +goal> ISA adjective head =goal =context> state process-lex ) ;; housekeeping only!!! (spp convert-word-to-adjective :effort 0.0) ;; need to distinguish "not" from other negatives (e.g. "never") ;; He did not go -- "not" requires an auxialiary and functions as a spec-mod ;; He never goes -- "never" functions as a pred-mod (p convert-word-to-not-negative =goal> ISA word-info word-type not-negative =context> ISA context state convert ==> +goal> ISA not-negative head =goal =context> state process ) ;; housekeeping only!!! (spp convert-word-to-not-negative :effort 0.0) (p convert-word-to-negative =goal> ISA word-info word-type negative =context> ISA context state convert ==> +goal> ISA negative head =goal =context> state process ) ;; housekeeping only!!! (spp convert-word-to-negative :effort 0.0) (p convert-word-to-adverb =goal> ISA word-info word-type adverb =context> ISA context state convert ==> +goal> ISA adverb head =goal =context> state convert-adverb-to-rel-mod ) ;; housekeeping only!!! (spp convert-word-to-adverb :effort 0.0) ;; all adverbs function as rel-mod!! ;; what about sit-mod??? (p convert-adverb-to-rel-mod =goal> ISA adverb =context> ISA context state convert-adverb-to-rel-mod ==> +goal> ISA rel-mod mod none head =goal =context> state process ) ;; housekeeping only!!! (spp convert-adverb-to-rel-mod :effort 0.0) (p convert-word-to-preposition =goal> ISA word-info word-type preposition =context> ISA context state convert ==> +goal> ISA preposition head =goal =context> state process-lex ) ;; housekeeping only!!! (spp convert-word-to-preposition :effort 0.0) (p convert-word-to-conjunction =goal> ISA word-info word-type conjunction =context> ISA context state convert ==> +goal> ISA conjunction head =goal arg-1 none arg-n none count 0 =context> state process ) ;; housekeeping only!!! (spp convert-word-to-conjunction :effort 0.0) ;; do we want to have different verb forms??? ;; e.g. pres-part, past-part, infin, aux ;; created word-morph-type to store this info ;; verb subtypes are intrans, trans, etc. (p convert-word-to-verb =goal> ISA word-info word-type verb word-subtype =word-subtype =context> ISA context state convert ==> +goal> ISA verb head =goal subtype =word-subtype =context> state process ) ;; housekeeping only!!! (spp convert-word-to-verb :effort 0.0) ;; reg-aux can function as pred-spec or pred (p convert-word-to-reg-aux =goal> ISA word-info word-type reg-aux =context> ISA context state convert ==> +goal> ISA reg-aux head =goal =context> state process ) ;; housekeeping only!!! (spp convert-word-to-reg-aux :effort 0.0) ;; process-lex instead of process ;; no need to look at preceding chunk ;; modal-aux can only function as pred-spec (p convert-word-to-modal-aux =goal> ISA word-info word-type modal-aux =context> ISA context state convert ==> +goal> ISA modal-aux head =goal =context> state process-lex ) ;; housekeeping only!!! (spp convert-word-to-modal-aux :effort 0.0) ;; probably need to look at preceding chunk (p convert-word-to-semi-aux =goal> ISA word-info word-type semi-aux =context> ISA context state convert ==> +goal> ISA modal-aux head =goal =context> state process ) ;; housekeeping only!!! (spp convert-word-to-semi-aux :effort 0.0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; generalized productions!!! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process chunk -- retrieve previous chunk ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; default ; - retrieve previous chunk (p process--default--retrieve-prev-chunk =goal> ISA top-type =context> ISA context state process chunk-stack =chunk-stack =chunk-stack> ISA chunk-stack-chunk this-chunk =chunk prev-chunk =prev-chunk ==> =context> state retrieve-prev-chunk chunk-stack =prev-chunk +retrieval> =chunk ) ;; prefer competing productions (spp process--default--retrieve-prev-chunk :p 0.75) ;; default case ;; only applies is no other procedure matches ;; add goal and retrieval chunks to stack (p process--default--add-chunks-to-stack =goal> ISA top-type =context> ISA context state retrieve-prev-chunk ==> =context> state add-chunks-to-stack ) (spp process--default--add-chunks-to-stack :p 0.75) ;; default case ;; only applies is no other procedure matches ;; add goal chunk to stack (p process--default--add-chunk-to-stack =goal> ISA top-type =context> ISA context state process-lex ==> =context> state add-chunks-to-stack ) (spp process--default--add-chunk-to-stack :p 0.75) ;; when predicate has all argument places filled ;; convert to sit-refer-expr (p convert-pred-to-sit-refer-expr =goal> ISA top-type =context> ISA context state convert-to-sit-refer-expr ==> +goal> ISA sit-refer-expr referent none-for-now mod none head =goal =context> state process rel-context none ) ;; housekeeping only!!! (spp convert-pred-to-sit-refer-expr :effort 0.0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; end generalized productions!!! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-obj-spec ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; process obj-spec quantifier retrieved (p process-obj-spec--quant-retrieved =goal> ISA obj-spec mod none head =spec =context> ISA context state retrieve-prev-chunk =retrieval> ISA quantifier ==> =context> state process rel-context obj =goal> mod =retrieval ) ;; not generalized sinced rel-context needs to be set!!! ;; default case ;; only applies if no other procedure matches ;; add retrieval chunk to stack as well as goal!!! (p process-obj-spec--default--add-chunks-to-stack =goal> ISA obj-spec =context> ISA context state retrieve-prev-chunk ==> =context> state add-chunks-to-stack rel-context obj ) (spp process-obj-spec--default--add-chunks-to-stack :p 0.85) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-quantifier ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; see convert-quantifier-to-quant-obj-spec ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-determiner ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; see convert-determiner-to-obj-spec ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-noun ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; see convert-noun-to-head ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-verb in object context ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; process verb in object context ; process verb ; - obj-context (p process-verb--obj-context--convert-to-rel-head =goal> ISA verb head =verb =context> ISA context state retrieve-prev-chunk rel-context obj ==> +goal> ISA rel-head mod none head =goal post-mod none ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-head ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; process head ; - modifier retrieved ;; add modifier and retrieve prev chunk (p process-head--prev-chunk-is-modifier--option-1 =goal> ISA head mod none =context> ISA context state retrieve-prev-chunk =retrieval> ISA modifier ==> =goal> mod =retrieval =context> state process ) (p process-head--prev-chunk-is-modifier--option-2 =goal> ISA head - mod none =context> ISA context state retrieve-prev-chunk =retrieval> ISA modifier ==> +goal> ISA head mod =retrieval head =goal post-mod none =context> state process ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-rel-head ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; process rel-head ; - rel-mod retrieved ;; add rel-mod and retrieve prev chunk (p process-rel-head--prev-chunk-is-rel-mod--option-1 =goal> ISA rel-head mod none =context> ISA context state retrieve-prev-chunk =retrieval> ISA rel-mod ==> =goal> mod =retrieval =context> state process ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-head ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; process head ; - obj-spec retrieved (p process-head--prev-chunk-is-obj-spec =goal> ISA head =context> ISA context state retrieve-prev-chunk =retrieval> ISA obj-spec ==> +goal> ISA obj-refer-expr spec =retrieval mod none head =goal post-mod none referent none-for-now =context> state process rel-context none ) ; process head ; - quantifier retrieved (p process-head--prev-chunk-is-quantifier =goal> ISA head =context> ISA context state retrieve-prev-chunk =retrieval> ISA quantifier ==> +goal> ISA obj-refer-expr spec =retrieval mod none head =goal post-mod none referent none-for-now =context> state process rel-context none ) ; process head ; - obj refer expr retrieved ;; make previous head a modifier ;; current head does not already have a modifier (p process-head--prev-chunk-is-obj-refer-expr--step-1 =goal> ISA head mod none =context> ISA context state retrieve-prev-chunk =retrieval> ISA obj-refer-expr head =retr-head ==> =goal> ISA head mod =retr-head =context> state make-goal-head-retrieval-head ) (p process-head--prev-chunk-is-obj-refer-expr--step-2 =goal> ISA head =context> ISA context state make-goal-head-retrieval-head =retrieval> ISA obj-refer-expr ==> =retrieval> head =goal =context> state move-retrieval-to-goal ) ;; housekeeping only!!! (spp process-head--prev-chunk-is-obj-refer-expr--step-2 :effort 0.0) (p process-head--prev-chunk-is-obj-refer-expr--step-3 =goal> ISA head =context> ISA context state move-retrieval-to-goal =retrieval> ISA obj-refer-expr ==> +goal> =retrieval =context> state process ) ;; housekeeping only!!! (spp process-head--prev-chunk-is-obj-refer-expr--step-3 :effort 0.0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; process-obj-refer-expr ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; chunk obj-refer-expr into prep ; - prep retrieved (p process-obj-refer-expr--prev-chunk-is-prep =goal> ISA obj-refer-expr =context> ISA context state retrieve-prev-chunk =retrieval> ISA preposition head =prep ==> =context> state process +goal> isa prep-obj mod none head =prep obj =goal ) ; process obj-refer-expr ; - pred-spec retrieved ; convert to predicate nominal (p process-obj-refer-expr--prev-chunk-is-pred-spec =goal> ISA obj-refer-expr =context> ISA context state retrieve-prev-chunk =retrieval> ISA pred-spec ==> +goal> ISA pred-aux-verb subj none spec =retrieval mod none head =retrieval post-mod none obj =goal =context> state process ) ; process obj-refer-expr (p process-obj-refer-expr--prev-chunk-is-ditrans-pred-type =goal> ISA obj-refer-expr =context> ISA context state retrieve-prev-chunk =retrieval> ISA ditrans-pred-type iobj none ==> =retrieval> iobj =goal +goal> =retrieval =context> state process ) ; process obj-refer-expr (p process-obj-refer-expr--prev-chunk-is-trans-pred-type =goal> ISA obj-refer-expr =context> ISA context state retrieve-prev-chunk =retrieval> ISA trans-pred-type obj none ==> =retrieval> obj =goal +goal> =retrieval =context> state process ) ;; if ditrans first obj is iobj, so prefer that production (spp process-obj-refer-expr--prev-chunk-is-trans-pred-type :p 0.85) ;; could eliminate these productions with multiple inheritance!!! ; process obj-refer-expr (p process-obj-refer-expr--prev-chunk-is-iobj-sitcomp-pred-type =goal> ISA obj-refer-expr =context> ISA context state retrieve-prev-chunk =retrieval> ISA iobj-sitcomp-pred-type iobj none ==> =retrieval> iobj =goal +goal> =retrieval =context> state process ) ; process obj-refer-expr (p process-obj-refer-expr--prev-chunk-is-iobj-obj-sitcomp-pred-type =goal> ISA obj-refer-expr =context> ISA context state retrieve-prev-chunk =retrieval> ISA iobj-obj-sitcomp-pred-type obj none ==> =retrieval> obj =goal +goal> =retrieval =context> state process ) ;; prefer first object to be iobj!!! (spp process-obj-refer-expr--prev-chunk-is-iobj-obj-sitcomp-pred-type :p 0.85) ; process obj-refer-expr ;; end-of-sit and no sitcomp available ;; make obj-refer-expr sitcomp (p process-obj-refer-expr--prev-chunk-is-sitcomp-pred-type--end-of-sit =goal> ISA obj-refer-expr =context> ISA context state retrieve-prev-chunk text-context end-of-sit =retrieval> ISA sitcomp-pred-type sitcomp none ==> =retrieval> sitcomp =goal +goal> =retrieval =context> state process ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; convert completed pred-type to sit-refer-expr ;; but how do we know when pred is completed??? ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (p convert-pred-type-to-sit-refer-expr =goal> ISA pred-type =context> ISA context state process ==> =context> state process rel-context none +goal> ISA sit-refer-expr head =goal mod none referent none-for-now ) ;; give this a low priority so that arguments will be ;; picked up first (spp convert-pred-type-to-sit-refer-expr :p 0.65) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; process-pred-spec ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; previous chunk is quant-obj-spec ;; make quant-obj-spec ORE (p process-pred-spec--prev-chunk-is-quant-obj-spec =goal> ISA pred-spec =context> ISA context state retrieve-prev-chunk =retrieval> ISA quant-obj-spec ==> +goal> ISA obj-refer-expr spec =retrieval mod none head =retrieval post-mod none referent none-for-now +retrieval> =goal =context> state add-reverse-chunks-to-stack ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; process-auxiliary ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; compound pred-spec ;; ;; process reg aux (p process-reg-aux--prev-chunk-is-pred-spec-option-1 =goal> ISA reg-aux =context> ISA context state retrieve-prev-chunk =retrieval> ISA pred-spec aux-1 none ==> =retrieval> aux-1 =goal +goal> =retrieval =context> state add-chunk-to-stack rel-context pred ) (p process-reg-aux--prev-chunk-is-pred-spec-option-2 =goal> ISA reg-aux =context> ISA context state retrieve-prev-chunk =retrieval> ISA pred-spec - aux-1 none aux-2 none ==> =retrieval> aux-2 =goal +goal> =retrieval =context> state add-chunk-to-stack ) (p process-reg-aux--prev-chunk-is-pred-spec-option-3 =goal> ISA reg-aux =context> ISA context state retrieve-prev-chunk =retrieval> ISA pred-spec - aux-1 none - aux-2 none aux-3 none ==> =retrieval> aux-3 =goal +goal> =retrieval =context> state add-chunk-to-stack ) ;; previous chunk is not pred-spec!!! ;; add both chunks to stack (p process-reg-aux--default--convert-to-pred-spec =goal> ISA reg-aux =context> ISA context state retrieve-prev-chunk ==> +goal> ISA pred-spec mod none modal-aux none aux-1 =goal aux-2 none aux-3 none head aux-1 neg none =context> rel-context pred ) ;; if pred-spec is prefer chunk, prefer that production (spp process-reg-aux--default--convert-to-pred-spec :p 0.9) ;; don't check previous chunk (p process-modal-aux--convert-to-pred-spec =goal> ISA modal-aux =context> ISA context state process-lex ==> +goal> ISA pred-spec mod none modal-aux =goal aux-1 none aux-2 none aux-3 none head modal-aux neg none =context> state process rel-context pred ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; process-negative ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; process-negative -- pred-spec retrieved (p process-negative--pred-spec-retrieved-step-1 =goal> ISA negative =context> ISA context state retrieve-prev-chunk =retrieval> ISA pred-spec ==> =retrieval> neg =goal +goal> =retrieval =context> state add-chunk-to-stack ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; process-preposition ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; process preposition ; - obj-context ;; probably don't want to generalize to predicate context!!! ;; add prep to stack to wait for obj (p process-preposition--obj-context =goal> ISA preposition head =prep =context> ISA context state process-lex rel-context obj ==> =context> state add-chunk-to-stack ) ;; "all of the books" ;; this conflicts with previous production ;; no retrieval for process-lex!!! ;; set to process to do retrieval (p process-preposition--not-obj-context =goal> ISA preposition =context> ISA context state process-lex - rel-context obj ==> =context> state process ) ;; quant-obj-spec before preposition ;; don't combine prep with quant-obj-spec ;; until obj of prep is available (p process-preposition--prev-chunk-is-quant-obj-spec =goal> ISA preposition =context> ISA context state retrieve-prev-chunk =retrieval> ISA quant-obj-spec ==> =context> state add-chunks-to-stack ) ;; quantifier before preposition ;; when quantifier is followed by a preposition ;; convert quantifier to a quant-obj-spec ;; and add both chunks to stack ;; retrieve current goal to put in retrieval buffer (p process-preposition--prev-chunk-is-quantifier =goal> ISA preposition head =prep =context> ISA context state retrieve-prev-chunk =retrieval> ISA quantifier ==> +goal> ISA quant-obj-spec mod none head =retrieval +retrieval> ISA preposition head =prep =context> state add-reverse-chunks-to-stack ) ; - predicate-context ;; do I want to pick up subject here ;; or after object of prep ;; assume after object of prep for now ;; add goal to stack (p process-preposition--prev-chunk-is-pred-spec =goal> ISA preposition head =prep =context> ISA context state retrieve-prev-chunk rel-context pred =retrieval> ISA pred-spec ==> +goal> ISA pred-prep subj none spec =retrieval mod none head =goal obj none =context> state add-chunk-to-stack ) ;; disprefer this specialized production (spp process-preposition--prev-chunk-is-pred-spec :p 0.9) ; process preposition "to" pred-spec retrieved ; - pred-spec retrieved, add chunk to stack (p process-preposition-to--prev-chunk-is-pred-spec =goal> ISA preposition head to =context> ISA context state retrieve-prev-chunk =retrieval> ISA pred-spec ==> =context> state add-chunks-to-stack ) ;; prefer this specialized production ;;(spp process-preposition-to--prev-chunk-is-pred-spec :p 1.1) ; process preposition rel-mod retrieved ; wait for obj to be retrieved (p process-preposition--rel-mod-retrieved =goal> ISA preposition =context> ISA context state retrieve-prev-chunk =retrieval> ISA rel-mod ==> =context> state add-chunks-to-stack ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-predicate nominal ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generalized see pred-type ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; process-sit-refer-expr ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; default case ;; only applies is no other procedure matches (p process-sit-refer-expr--add-chunks-to-stack =goal> ISA sit-refer-expr =context> ISA context state retrieve-prev-chunk ==> =context> state add-chunks-to-stack rel-context none ) (spp process-sit-refer-expr--add-chunks-to-stack :p 0.75) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-prep-obj ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (p process-prep-obj--no-obj-yet =goal> ISA prep-obj obj none =context> ISA context state process-prep-obj ==> =context> state add-chunk-to-stack ;;chunk =goal ) ; process prep-obj obj-refer-expr retrieved ; - obj-refer-expr retrieved (p process-prep-obj--prev-chunk-is-obj-refer-expr =goal> ISA prep-obj obj =obj =context> ISA context state retrieve-prev-chunk =retrieval> ISA obj-refer-expr post-mod none ==> =retrieval> post-mod =goal +goal> =retrieval =context> state process ) ; process prep-obj quant-obj-spec retrieved ; - quantifier retrieved ;; can't point head-obj of prep-obj to obj-refer-expr ;; get rid of head-obj slot -- it causes circularity problems!!! (p process-prep-obj--prev-chunk-is-quant-obj-spec =goal> ISA prep-obj obj =obj =context> ISA context state retrieve-prev-chunk =retrieval> ISA quant-obj-spec ==> +goal> ISA obj-refer-expr referent none-for-now spec head mod none head =retrieval post-mod =goal =context> state process rel-context none ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-pred-prep ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generalized see pred-type ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; process-adjective ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; process adjective ; - obj-context (if it's not a predicate context assume head) (p process-adjective--obj-context =goal> ISA adjective head =adj =context> ISA context state process-lex - rel-context pred ==> +goal> ISA obj-mod mod none head =goal =context> state process ) ; - predicate-context (p process-adjective--predicate-context =goal> ISA adjective head =adj =context> ISA context state process-lex rel-context pred ==> +goal> ISA pred-adj subj none spec none mod none head =goal post-mod none =context> state process ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; process-modifier ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; process modifier rel-mod retrieved ; - only retrieve first rel-mod for now!!! (p process-modifier--prev-chunk-is-rel-mod =goal> ISA modifier =context> ISA context state retrieve-prev-chunk =retrieval> ISA rel-mod ==> =context> state process =goal> mod =retrieval ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; process-pred-adj ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generalized to pred-type ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process-adverb ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; see convert-adverb-to-rel-mod ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; process-rel-mod ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; process rel-mod rel-mod retrieved (p process-rel-mod--prev-chunk-is-rel-mod =goal> ISA rel-mod head =rel-mod =context> ISA context state retrieve-prev-chunk =retrieval> ISA rel-mod ==> =goal> mod =retrieval =context> state process ) ; process rel-mod pred-spec retrieved ;; add both chunks to stack (p process-rel-mod--prev-chunk-is-pred-spec =goal> ISA rel-mod head =rel-mod =context> ISA context state retrieve-prev-chunk =retrieval> ISA pred-spec ==> =retrieval> mod =goal +goal> =retrieval =context> state add-chunk-to-stack ) ; process rel-mod sit refer expr retrieved (p process-rel-mod--sit-refer-expr-retrieved =goal> ISA rel-mod head =rel-mod =context> ISA context state retrieve-prev-chunk =retrieval> ISA sit-refer-expr mod none ==> =context> state proces +goal> ISA sit-refer-expr head =retrieval mod =goal referent none-for-now ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; process-verb ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; process verb -- assume it is a pred ;; unless it is an obj context ; - not object context (p process-verb--not-obj-context =goal> ISA verb head =verb =context> ISA context state retrieve-prev-chunk - rel-context obj ==> =context> state convert-verb-to-pred-verb ) ;; previous chunk is "to" ;; convert verb to infinitive ;; how should I note infinitival status of verb??? ;; use of "subj trace" causes mismatch with "subj none" down the road (p process-verb--prev-chunk-is-to =goal> ISA verb =context> ISA context state retrieve-prev-chunk =retrieval> ISA preposition head to ==> =context> state convert-verb-to-pred-verb ) ;; previous chunk is obj-refer-expr (p process-verb--prev-chunk-is-obj-refer-expr =goal> ISA verb =context> ISA context state retrieve-prev-chunk =retrieval> ISA obj-refer-expr ==> =context> state convert-verb-to-pred-verb ) (p process-verb--convert-to-pred-intrans-verb =goal> ISA verb head =verb subtype intrans-verb =context> ISA context state convert-verb-to-pred-verb ==> +goal> ISA pred-intrans-verb subj none spec none mod none head =goal post-mod none =context> state retrieve-prev-chunk ) ;; housekeeping only (spp process-verb--convert-to-pred-intrans-verb :effort 0.0) (p process-verb--convert-to-pred-trans-verb =goal> ISA verb head =verb subtype trans-verb =context> ISA context state convert-verb-to-pred-verb ==> +goal> ISA pred-trans-verb subj none spec none mod none head =goal post-mod none obj none =context> state retrieve-prev-chunk ) ;; housekeeping only (spp process-verb--convert-to-pred-trans-verb :effort 0.0) (p process-verb--convert-to-pred-ditrans-verb =goal> ISA verb head =verb subtype ditrans-verb =context> ISA context state convert-verb-to-pred-verb ==> +goal> ISA pred-ditrans-verb subj none spec none mod none head =goal post-mod none obj none iobj none =context> state retrieve-prev-chunk ) ;; housekeeping only (spp process-verb--convert-to-pred-ditrans-verb :effort 0.0) (p process-verb--convert-to-pred-verb-subj-sitcomp =goal> ISA verb head =verb subtype verb-subj-sitcomp =context> ISA context state convert-verb-to-pred-verb ==> +goal> ISA pred-verb-subj-sitcomp subj none spec none mod none head =goal post-mod none sitcomp none =context> state retrieve-prev-chunk ) ;; housekeeping only (spp process-verb--convert-to-pred-verb-subj-sitcomp :effort 0.0) (p process-verb--convert-to-pred-verb-subj-iobj-sitcomp =goal> ISA verb head =verb subtype verb-subj-iobj-sitcomp =context> ISA context state convert-verb-to-pred-verb ==> +goal> ISA pred-verb-subj-iobj-sitcomp subj none spec none mod none head =goal post-mod none iobj none sitcomp none =context> state retrieve-prev-chunk ) ;; housekeeping only (spp process-verb--convert-to-pred-verb-subj-iobj-sitcomp :effort 0.0) (p process-verb--convert-to-pred-verb-subj-iobj-obj-sitcomp =goal> ISA verb head =verb subtype verb-subj-iobj-obj-sitcomp =context> ISA context state convert-verb-to-pred-verb ==> +goal> ISA pred-verb-subj-iobj-obj-sitcomp subj none spec none mod none head =goal post-mod none obj none iobj none sitcomp none =context> state retrieve-prev-chunk ) ;; housekeeping only (spp process-verb--convert-to-pred-verb-subj-iobj-obj-sitcomp :effort 0.0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; general procedures for all pred types ;; ;; process-pred-type ;; pred-verb ;; pred-adj ;; pred-prep ;; pred-aux-verb ;; pred-nominal ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (p process-pred-type--prev-chunk-is-pred-spec =goal> ISA pred-type =context> ISA context state retrieve-prev-chunk =retrieval> ISA pred-spec ==> =goal> spec =retrieval =context> state process ) (p process-pred-type--prev-chunk-is-rel-mod =goal> ISA pred-type =context> ISA context state retrieve-prev-chunk =retrieval> ISA rel-mod ==> =goal> mod =retrieval =context> state process ) ;; previous chunk is obj-refer-expr ;; subject = none ;; make subject (p process-pred-type--prev-chunk-is-obj-refer-expr =goal> ISA pred-type subj none =context> ISA context state retrieve-prev-chunk =retrieval> ISA obj-refer-expr ==> =goal> subj =retrieval =context> state process ) ;; previous chunk is quant-obj-spec ;; subject = none ;; make quant-obj-spec subject ;; should quant-obj-spec be converted to obj-refer-expr first??? (p process-pred-type--prev-chunk-is-quant-obj-spec =goal> ISA pred-type subj none =context> ISA context state retrieve-prev-chunk =retrieval> ISA quant-obj-spec ==> =goal> subj =retrieval =context> state process ) ;; text-context = end-of-sit ;; assume pred-type is sit-refer-expr (p process-pred-type--end-of-sit =goal> ISA pred-type =context> ISA context text-context end-of-sit ==> +goal> ISA sit-refer-expr mod none head =goal referent none-for-now =context> state process ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; process pred-intrans-verb procedures ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generalized -- see pred-type ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; process pred-adj procedures ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generalized -- see pred-type ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; process pred-trans-verb procedures ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generalized see pred-type ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; process pred-ditrans-verb procedures ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generalized see pred-type ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; process pred-verb-subj-sitcomp procedures ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generalized see pred-type ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; process pred-verb-subj-iobj-sitcomp procedures ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generalized see pred-type ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; process-sit-refer-expr in context of sitcomp-pred-type ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; process sit-refer-expr after sitcomp-pred-type ; instantiate sitcomp (p process-sit-refer-expr--sitcomp-pred-type-retrieved--sit-refer-expr-is-sitcomp =goal> ISA sit-refer-expr =context> ISA context state retrieve-prev-chunk =retrieval> ISA sitcomp-pred-type sitcomp none ==> =retrieval> sitcomp =goal +goal> =retrieval =context> state process ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; process-end-of-sit in context of pred-type ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (p process-end-of-sit--pred-type-retrieved--convert-to-sit-refer-expr =goal> ISA end-of-sit =context> ISA context state retrieve-prev-chunk =retrieval> ISA pred-type ==> +goal> ISA sit-refer-expr head =retrieval mod none referent none-for-now =context> state process text-context end-of-sit ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; process-end-of-obj in context head ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (p process-end-of-obj--head-retrieved--convert-to-obj-refer-expr =goal> ISA end-of-obj =context> ISA context state retrieve-prev-chunk =retrieval> ISA head ==> +goal> ISA obj-refer-expr spec none mod none head =retrieval post-mod none-for-now =context> state process ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; process-conjunctions ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; process conjunction any-type retrieved ;; arg-1 is none (p process-conj--any-type-retrieved--option-1 =goal> ISA conjunction count 0 =context> ISA context state retrieve-prev-chunk =retrieval> ISA top-type ==> =goal> arg-1 =retrieval count 1 =context> state process ) ; process > 2 conjuncts any-type retrieved ;; arg-1 is not none (p process-conj--any-type-retrieved--option-2 =goal> ISA conjunction arg-1 =arg-1 count 1 =context> ISA context state retrieve-prev-chunk =retrieval> ISA top-type !eval! (subtype (wme-type (get-safe-wme =retrieval)) (wme-type (get-safe-wme =arg-1))) ==> +goal> ISA conj-3 arg-1 =arg-1 arg-2 =retrieval count 2 =context> state process ) (p process-conj-3--any-type-retrieved =goal> ISA conj-3 arg-1 =arg-1 arg-2 =arg-2 count 2 =context> ISA context state retrieve-prev-chunk =retrieval> ISA top-type !eval! (subtype (wme-type (get-safe-wme =retrieval)) (wme-type (get-safe-wme =arg-1))) ==> +goal> ISA conj-4 arg-1 =arg-1 arg-2 =arg-2 arg-3 =retrieval count 3 =context> state process ) (p process-conj-4--any-type-retrieved =goal> ISA conj-4 arg-1 =arg-1 arg-2 =arg-2 arg-3 =arg-3 count 3 =context> ISA context state retrieve-prev-chunk =retrieval> ISA top-type !eval! (subtype (wme-type (get-safe-wme =retrieval)) (wme-type (get-safe-wme =arg-1))) ==> +goal> ISA conj-5 arg-1 =arg-1 arg-2 =arg-2 arg-3 =arg-3 arg-4 =retrieval count 4 =context> state process ) ; process any-type conjunction retrieved (p process-any-type--conj-retrieved =goal> ISA top-type =context> ISA context state retrieve-prev-chunk =retrieval> ISA conjunction arg-1 =arg-1 arg-n none count =count !eval! (subtype (wme-type (get-safe-wme =goal)) (wme-type (get-safe-wme =arg-1))) ==> =retrieval> arg-n =goal count (!eval! (+ =count 1)) =context> state convert-to-arg-type +goal> =retrieval ) ;; make arg-1 goal and put conjunction in conjuncts slot (p process-conjunction--convert-to-arg-type =goal> ISA conjunction arg-1 =arg-1 =arg-1> ISA top-type head =head =context> ISA context state convert-to-arg-type ==> =goal> arg-1 =head =arg-1> head =goal +goal> =arg-1 =context> state process ) ;; housekeeping only!!! (spp process-conjunction--convert-to-arg-type :effort 0.0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; set production parameters ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; see individual productions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; set other parameters ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; load the lisp-code-file if not already loaded (unless *already-loaded-extra-file* (setf *already-loaded-extra-file* t) (compile-file *lisp-code-file* :load-after-compile t)) (setallbaselevels 5) (set-general-base-levels (context 10)) (setf *actr-enabled-p* t) (goal-focus goal)