Ex5.2 Elizaで遊んでみよう

;; Exercise 5.2 [m] Experiment with this version of ELIZA. Show some
;; exchanges where it performs well, and some where it fails.  Try to
;; characterize the difference.  Which failures could be fixed by
;; changing the rule set, which by changing the pat-match function
;; (and the pattern language it defines), and which require a change
;; to the eliza program itself?

ELIZAで遊んでみようということで、emacsのdoctorと会話させてみることに。
と言ってもカット&ペーストを繰り返すだけですが。
そして失敗の傾向を考えて3つに分類します。

  1. ルールセットの変更が必要か
  2. パターンマッチ関数の変更が必要か
  3. ELIZAプログラム自体の変更が必要か

その1

ELIZA> (I'll ask the questions, if you don't mind!)

上の入力を行うと、早速エラー。

SB-INT:SIMPLE-READER-ERROR on #<SWANK-BACKEND::SLIME-INPUT-STREAM {11940FE1}>:
  comma not inside a backquote
   [Condition of type SB-INT:SIMPLE-READER-ERROR]

これは、elizaそのものを修正する必要がある問題ですね。
(read)でユーザからの入力を取っていますが、 ","がlispの文法違反になっています。

その2

ELIZA> (Maybe your plans have something to do with this.)
NIL
ELIZA> (Are you sure that that?)
NIL
ELIZA> (I could ask the same thing myself.)
NIL
ELIZA> 

NILが返ってくるパターンでは、ルールセットの変更で補えますね。

その3

パターンマッチ関数の変更が必要な修正はどんなモノがありますかね。
ちょっと遊んだだけでは思いつきませんでした。