2008-05-01から1ヶ月間の記事一覧

Ex5.4〜Ex5.6 ELIZAの改良問題

ELIZAの改良問題を3つ ;; Exercise 5.4 [s] We mentioned that our version of ELIZA cannot ;; handle commas or double quote makes in the input. However, it seems ;; to handle the apostrophe in both input and patterns, Explain. commaやdouble q…

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 c…

5.4 Elizaプログラム

5.4節で、ELIZAを組み上げます。置き換えルールは以下のように定義します。 ルールセットはルールのリストで表現 ルールは(pattern . responses)で表現 動作の概要は以下のようになります。 ユーザからの入力は(read)でシンボルのリストとして読み込む 入力…

5.3 Segmentパターンマッチ

この節ではパターンマッチに複数の単語にマッチさせる変数を導入しました。Segmentパターンは"(?* var)"の形で表し、以下のように使います。 ((?* ?x) is (?* ?y)) このパターンを '(this is a pen)とマッチさせると、 ((?x . this) (?y a pen)) とマッチし…

5章 ELIZA 5.2とEx5.1

Ex4.5〜Ex4.7は[d] ratingなのでさすがに難しいです。Ex4.6で5,6章でパターンマッチングについて勉強してこいと言われたので取りあえず先に進みます。 5.1 ELIZAの記述と明確化 ELIZAは入力されたシンボルのリストとあらかじめ用意しておいたルールセットに…

colorizeをインストール

http://www.cliki.net/colorize をSBCLにインストール。asdf-installでインストールしようとしたところ、パッケージが見つからないと言われたので、手動でインストールします。 bash-3.2$ svn co svn://unmutual.info/colorize bash-3.2$ cd ~/.sbcl/systems…

hyperspecをanythingから引く

突発性CL勉強会で小耳に挟んだanything.el。結構有名な機能だったのですね。 使ってみたところ、さっそくハマりました。これは便利。練習がてら、hyperspecをanythingから引く設定を定義しました。思いもしなかったシンボルとかが引っかかって結構面白いです…

Ex4.5 WarrenのWARPLAN その1

;; Exercise 4.5[d] Write a planning program that, like Warren's ;; WARPLAN, keeps track of the list of goals that remain to be done as ;; well as the list of goals that have been achieved and should not be ;; undone. The program should nev…