You are not logged in.
Cookie is a chatbot which has organizational commands. Here is an example (the lines starting with '>>>' or 'reminder>' are user inputted):
Webpage: onebluecat.net/cookie
>>> hi
% hi
>>> make a new reminder
reminder> every tuesday i go skating
>>> show me my reminders
Every Tuesday i go skating
>>> i'd like to view a note
What is the name of the note you would like to view: example
[PROCESSED]
-- This is the first sentence of the paragraph
[ORIGINAL]
This is the first sentence of the paragraph. Cookie takes the first sentences and puts them in the PROCESSED section.
>>> bye
% bye
> /exit
Reminders, notes, and learned phrases are persistent from session to session.
There is now a project called Pretzel by y27 that attempts to do that same thing. If you like cookie, please take a look at Pretzel.
I hope you like it.
EDIT: fixed documentation.
Last edited by Lexion (2010-03-13 20:18:21)
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
Interesting, I'm currently working on a chat bot and have my computer sent up to text/email people. Might be an interesting idea, if you feel like extending your program. I don't program in python, so I'm sort of lost when I get this:
api/sbi_run chat/chat.sbi
== Cookie ==
backing up logs...
cleaning up pycs...
checking resources...
=====================
=====================
checking for python...
checking for sbi_3d...
executing sbi...
================
= SBI: python main.py main.stdat
= 3D: no
================
python: can't open file 'main.py': [Errno 2] No such file or directory
cat: *.log: No such file or directory
What am I missing?
Offline
Sorry, my bad.
you have to cd into the $PROJECT_ROOT/chat directory and type:
aiAPI/sbi_run chat.sbi
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
Hello, your program is amazing. This is what I always wanted to code, but unfortunately I am still learning and have not been able to implement my ideas. Perhaps you could give a few small pointers on where to start? It does not have to be as complex as your AI, just give a few hints on where to start.
Thank you in advance.
Last edited by baion baion (2010-01-31 21:37:29)
Offline
Thank you very much.
The first thing you need to do is install (from the AUR) and learn a bit about nltk (Natural Language ToolKit). You can use this to remove articles and unnessesary words from sentences. Then make a key-value table and a way of comparing sentences. Here is the general structure of my AI:
get user input
parse user input
remove unnessesary words
loop through key-value table
if user's inputted sentence is similar to a key sentence
display the value sentence
if no sentence can be found that matches
ask user to give the correct reply
add reply to key-value table
I hope you find this helpful.
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
Great Bot
cd, ls would be nice
Time in German:
Zeit :/shell echo "Es ist `date +%H` Uhr `date +%M`" | say
Edit:
I use sox and mbrola for speaking ( http://gentoo-wiki.stefreak.de/de.gento … brola.html )
Edit2:
cd:
elif "cd" in s:
os.chdir(result[1])
print "Dir: "+result[1]
return 1
Last edited by Echtor2oo3 (2010-02-03 10:58:03)
Offline
Thanks.
I've added ls and cd. I've also made the instructions more intiutive:
Instead of using
install: <p>
find-pkg: <p>
update
remind: <r>
done: <r>
note: <n>
unnote: <n>
date: <d>
cancel: <d>
show notes
show reminders
show dates
It is now
install <pkg> (no colon)
find the package <pkg>
update my system
please remind me to <r>
i've done <r>
(the rest is the same)
NOTE: you don't have to use the exact words I used.
DOWNLOAD: sbi_0.1a_2-3-2010.tar.gz
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
Sweeet... though I've been working on something exactly like this for 6 months
Last edited by Blue Peppers (2010-02-03 21:29:45)
Consistency is not a virtue.
Offline
Hi I'm having some trouble getting this working. So far I :
downloaded/extracted the tar.gz
cd /home/btartsa/pkg_builds/sbi_0.1a_2-3-2010/chat
installed python-nltk and nltk-data from aur (versions seem current)
tried to run it:
$aiAPI/sbi_run chat.sbi
== Cookie ==
backing up logs...
cleaning up pycs...
checking resources...
=====================
=====================
checking for python...
checking for sbi_3d...
executing sbi...
================
= SBI: python main.py main.stdat
= 3D: no
================
loading environment...
Traceback (most recent call last):
File "main.py", line 263, in <module>
gp.read("hello world")
File "/home/btartsa/pkg_builds/sbi_0.1a_2-3-2010/chat/grammar.py", line 35, in read
self.cache_tag = nltk.pos_tag(self.cache_tok)
File "/usr/lib/python2.6/site-packages/nltk/tag/__init__.py", line 62, in pos_tag
tagger = nltk.data.load(_POS_TAGGER)
File "/usr/lib/python2.6/site-packages/nltk/data.py", line 593, in load
resource_val = pickle.load(_open(resource_url))
File "/usr/lib/python2.6/site-packages/nltk/data.py", line 672, in _open
return find(path).open()
File "/usr/lib/python2.6/site-packages/nltk/data.py", line 454, in find
raise LookupError(resource_not_found)
LookupError:
**********************************************************************
Resource 'taggers/maxent_treebank_pos_tagger/english.pickle' not
found. Please use the NLTK Downloader to obtain the resource:
>>> nltk.download().
Searched in:
- '/home/btartsa/nltk_data'
- '/usr/share/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/lib/nltk_data'
- '/usr/local/lib/nltk_data'
**********************************************************************
cat: *.log: No such file or directory
Searched the missing resource:
$locate english.pickle
/usr/share/nltk/data/taggers/maxent_treebank_pos_tagger/english.pickle
/usr/share/nltk/data/tokenizers/punkt/english.pickle
So...I'm at a loss. Googling was no help either. Would like to try this out though!
Hand over the spoon Milt...
Offline
remove the nltk-data packet and install this -> http://echtor.net/null/python/nltk_data.tar.gz
greetz
Last edited by Echtor2oo3 (2012-05-02 15:11:40)
Offline
@Blue Peppers: Please, keep working on yours (if you want). Competition would be nice.
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
I don't seem to have a folder named aiAPI nor do I have python module file named aiAPI.py. Is there something wrong with the download tarball?
Offline
I download and then test every tarball now, so no. Try this:
cd $PROJECT_ROOT/chat
ln -s ../api aiAPI
This should link the "api" directory into "chat/aiAPI", which is how it's suppose to be.
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
I moved the tarball to an ext4 partition, I previously used a FAT32 one, and the link appeared. I had no idea that links are not working on FAT32 partitions.
Offline
Intriguing... But how is this different from directly interacting with the shell? Am I missing something?
Offline
@baion baion: I have a similar problem on my win7 machine.
@AlexS: It uses natural language (aka plain english) to interact as opposed to the shell language. Also, it interfaces with the shell to run commands, so it can't replace the shell.
Sorry for the late response.
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
Do you think this could facilitate interaction of a non technical person with a terminal, or are the syntax requirements so strict that it's just as hard as to learn the commands directly?
Last edited by AlexS (2010-02-11 21:01:33)
Offline
I don't intend to facilitate non-tech-literate people. It's more of a cool thing than a useful thing in my eyes (tell me if you think otherwise).
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
Regarding leadghost's problem:
LookupError:
**********************************************************************
Resource 'taggers/maxent_treebank_pos_tagger/english.pickle' not
found. Please use the NLTK Downloader to obtain the resource:
>>> nltk.download().
Searched in:
- '/home/btartsa/nltk_data'
- '/usr/share/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/lib/nltk_data'
- '/usr/local/lib/nltk_data'
**********************************************************************
This seems to point to a bug. The package unsupported/python-nltk looks in '/usr/share/nltk_data' but the package unsupported/nltk-data installs the data into '/usr/share/nltk/data'. I am not sure which package to blame (but '/usr/share/nltk/data' does seem more logical to me). I worked around this by adding the following line to /usr/lib/python2.6/site-packages/nltk/data.py.
Starting at line 83:
# Common locations on UNIX & OS X:
else: path += [
'/usr/share/nltk_data',
'/usr/share/nltk/data', <<- add this line
'/usr/local/share/nltk_data',
'/usr/lib/nltk_data',
'/usr/local/lib/nltk_data']
This is a fantastic bot, endless possibilities...
p.s. edit: After looking into this a bit more the nltk-docs say that the data should be installed to "/usr/share/nltk_data" so this should be fixed in the PKGBUILD if the unsupported/nltk-data is used or (according to the nltk-data docs ) set the environment variable NLTK_DATA="/usr/share/nltk/data" if you used the default location.
Last edited by winford (2010-02-27 15:13:27)
Offline
Is there a command (like help or list) that will list all commands? and if so is there a way to show built in ones separately from "learned" ones?
Thanks for the great work!
Last edited by winford (2010-02-21 09:03:22)
Offline
There isn't now, but I can add one. I'm quite busy on another project right now, but in a few days I'll add your suggestions.
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
Thanks again. For the time being I get the list of "learned" commands by teaching the following:
> what have you learned?
I don't know what to say to that.
new response> /shell less main.stdat
Of course this only works until 'cd' is used. Looks like its time to start learning python so I can post a patch instead of a feature request next time.
Offline
You shouldn't need to do that. I'll hard code it in the next release.
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
Nice project
One thing though; your comparing function seems a little overly simple to me - unless I missed something, it's this right?
class Compare(object):
def basic(self, a, b):
if len(a) != len(b):
return False
for i in range(0, len(a)):
if a[i] != b[i]:
return False
return True
I would expect that if you tell it that "open Program" should open Program, it should also work out that you mean the same when you input something like "launch Program", which your function would miss.
I've written a (very) simple function to do that; it mainly uses wordnet.path_similarity and "crosses-off" words that look similar in its two arguments. This is of course quite primitive (I mainly used this approach to learn about nltk) but I found it to work surprisingly well for simple situations like these (ie you won't type an essay or even a full sentence (usually) in the prompt).
I've added it to my git account, you can find it there if you are interested, using it is very straightforward:
http://github.com/houbysoft/meaningcmp
EDIT: typo
Last edited by y27 (2010-03-02 03:21:26)
Offline