add module to talk

This commit is contained in:
Vy Nguyen 2013-07-22 10:06:32 -04:00
parent b0a924da27
commit 8bfd6cd6d3
11 changed files with 43 additions and 4 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
modules/talk/logs

View File

@ -3,7 +3,7 @@
arg1=$1 # sender (the person I am talking to)
arg2=$2 # unclear????
user_dir=eliza_bot/$1
user_dir=modules/talk/logs/$1
if [ ! -d "$user_dir" ]; then
mkdir $user_dir
fi
@ -14,9 +14,9 @@ if [ -f "$user_dir/GOODBYE" ]; then
rm $user_dir/GOODBYE
fi
shift 2 # chop off the first two args
shift 3 # chop off the first two args
echo "$@" >> $user_dir/input
cat $user_dir/input | java -jar eliza_bot/eliza_java.jar > $user_dir/output
cat $user_dir/input | java -jar modules/talk/talk_bot.jar > $user_dir/output
# retcode of value 1 means the user said goodbye
retcode="${PIPESTATUS[1]}"
@ -31,4 +31,4 @@ if [ $retcode -eq "1" ]; then
mv $user_dir/output $user_dir/"output_$stamp"
# leave good-bye flag (indicating the user already said goodbye)
touch $user_dir/GOODBYE
fi
fi

2
modules/talk/Vy/input Normal file
View File

@ -0,0 +1,2 @@
talk test
talk bye

3
modules/talk/Vy/output Normal file
View File

@ -0,0 +1,3 @@
Hello, how's it going? Please tell me your problem.
I'm not sure I understand you fully.
Please go on.

5
modules/talk/mlee/input Normal file
View File

@ -0,0 +1,5 @@
so can you do math?
yes but can you?
you seem to have talked me into a corner
i think... you seem... errrrr
indeed

6
modules/talk/mlee/output Normal file
View File

@ -0,0 +1,6 @@
Hello, how's it going? Please tell me your problem.
You believe I can do math don't you ?
You seem to be quite positive.
Why do you think I seem to have talked you ?
You say you think ?
I'm not sure I understand you fully.

4
modules/talk/plant/input Normal file
View File

@ -0,0 +1,4 @@
WWWWWWWAAAAAAAZZZZZZZAAAAAAA
I'm not sure you fully understand me
how did you know?
Why wouldn't I ask

View File

@ -0,0 +1,5 @@
Hello, how's it going? Please tell me your problem.
I'm not sure I understand you fully.
Is it because you are not sure I fully understand you that you came to me ?
Why do you ask ?
Does that question interest you ?

BIN
modules/talk/talk_bot.jar Normal file

Binary file not shown.

View File

@ -0,0 +1,6 @@
talk you are an evil sentient computer
talk yes, especially sentient ones
no, YOURE possitive
you're going to make me cry
abcdefg
what is the square root of two?

View File

@ -0,0 +1,7 @@
Hello, how's it going? Please tell me your problem.
Do computers worry you?
You seem to be quite positive.
Are you saying no just to be negative?
What makes you think I am going to make you cry ?
I'm not sure I understand you fully.
Why do you ask ?