Skip to content

Commit ea1d50c

Browse files
committed
adds the eliza command line app
finishes #20
1 parent aff7835 commit ea1d50c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

bin/eliza-rb

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#! /usr/bin/env ruby
2+
3+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
4+
require 'eliza'
5+
6+
ELIZA_PRE = 'ELIZA: '
7+
USER_PRE = 'YOU : '
8+
9+
eliza = Eliza::Bot.new
10+
11+
puts ELIZA_PRE + eliza.initial_phrase
12+
while !eliza.bye?
13+
input = gets
14+
puts ELIZA_PRE + eliza.transform(input)
15+
end

0 commit comments

Comments
 (0)