menu

英語過去式を生成する認知モデル

Task


Knowledge Representation


How to run the model


Useful Cmmand


Model


(clear-all)

(define-model past-tense
   (sgp
     :V t
     :esc T
     :ul t
     :OL 6   
     :BLL 0.5  
     :ANs 0.1   
     :EGs 0.2   
     :mas   3.5
     :imaginal-activation 1.0
     :LF 0.5
     :RT 0.5
     :epl t
     :alpha 0.1
     :pct t
     :iu 5    
     :ncnar nil
     :do-not-harvest imaginal)

  (chunk-type past-tense verb stem suffix)
  (chunk-type goal state)

  (define-chunks
      (starting-goal isa goal state start)
      (start isa chunk) (blank isa chunk) (done isa chunk) (wait-retrieve isa chunk)
      (wait-analogy isa chunk)
  )


  (declare-buffer-usage goal goal state)
  (declare-buffer-usage imaginal past-tense :all)

(p retrieve-past-tense
  =goal>
    isa goal
    state start
  =imaginal>
    isa past-tense
    verb =word
    stem nil
    suffix nil
==>
  +retrieval>
    isa past-tense
    verb =word
  =goal>
    isa goal
    state wait-retrieve
)

(p analogy
  =goal>
    isa goal
    state start
  =imaginal>
    isa past-tense
    verb =word
    suffix nil
    stem   nil
==>
  +retrieval>
    isa past-tense
    - verb nil
    - stem nil
    - suffix nil
  =goal>
    isa goal
    state wait-analogy
)

(p retrieve-success
  =goal>
    isa goal
    state wait-retrieve
  ?imaginal>
    state free
  =imaginal>
    isa past-tense
    verb =word
  =retrieval>
    isa past-tense
    suffix =su
    stem   =st
==>
  +imaginal>
    isa past-tense
    verb   =word
    suffix =su
    stem   =st
  =goal>
    isa goal
    state done
)


(p analogy-success-add-suffix
  =goal>
    isa goal
    state wait-analogy
  ?imaginal>
    state free
  =imaginal>
    isa past-tense
    verb =word
  =retrieval>
    isa past-tense
    verb =a
    stem =a
    suffix =s
==>
  +imaginal>
    isa past-tense
    verb   =word
    suffix =s
    stem   =word
  =goal>
    isa goal
    state done
)


(p analogy-success-giveup
  =goal>
    isa goal
    state wait-analogy
  =imaginal>
    verb =word
  ?imaginal>
    state free
  =retrieval>
    isa past-tense
    suffix =s
    verb =a
    stem =b
    !safe-eval! (not (eq =a =b));(a!=b)
     !safe-eval! (not (eq =a =word));(a!=word)
==>
  =goal>
    isa goal
    state done
  +imaginal>
    isa past-tense
    verb =word
    suffix nil
    stem nil
)

(p analogy-success-match-and-copy
  =goal>
    isa goal
    state wait-analogy
  =imaginal>
    verb =word
  ?imaginal>
    state free
  =retrieval>
    isa past-tense
    suffix =s
    verb =word
    stem =b
==>
  =goal>
    isa goal
    state done
  +imaginal>
    isa past-tense
    verb =word
    suffix =s
    stem =b
)


(p retrieve-fail
  =goal>
    isa goal
    state wait-retrieve
  ?retrieval>
    buffer   failure
  ?imaginal>
    state free
  =imaginal>
==>
  =goal>
    isa goal
    state done
)


(p analogy-fail
  =goal>
    isa goal
    state wait-analogy
  ?retrieval>
    buffer   failure
  ?imaginal>
    state free
  =imaginal>
==>
  =goal>
    isa goal
    state done
)

;;; When there is a stem and no suffix we have an irregular
(p past-tense-irregular
   =goal>
     isa    goal
     state  done
   =imaginal>
     isa    past-tense
     verb   =word
     stem   =past
     suffix blank
   ==>
   =goal>
     state  nil)

(spp past-tense-irregular :reward 5)

;;; When the stem matches the verb and the suffix is not "blank" consider it regular

(p past-tense-regular
   =goal>
    isa     goal
    state   done
   =imaginal>
     isa    past-tense
     verb   =stem
     stem   =stem
     suffix =suffix
   !safe-eval! (not (eq =suffix 'blank))
  ==>
   =goal>
     state  nil)

(spp past-tense-regular :reward 4.2)

;;; when there's no stem and no suffix that's a "give up" result

(p no-past-tense-formed
   =goal>
     isa    goal
     state  done
   =imaginal>
     isa    past-tense
     stem   nil
     suffix nil
  ==>
   =goal>
     state  nil)

(spp no-past-tense-formed :reward 3.9)
)

Results