AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Building from the ground up?
 
 

Me and a close friend of mine are working on a chatbot. The goal is for natural language and understanding of speech. I have looked through many of the threads here on the forum but making the first steps on the way to coding is providing a lot of trouble. I am planning to start out with python then move to a faster language. Any help would be much appreciated.

 

 
  [ # 1 ]

I am not convinced that building a conversational agent from “scratch” is a good thing.

If you have settled on Python, then you should make a thorough inventory of the available resources, if for no other reason than to see how others approached it.  The advantage of Python would be to use a cloud-hosted option such as Google App Engine, except the drawback is that uses flat files.  I do not like your idea of changing horses in mid-stream.

However, it is also worth considering AI languages and available interpreters.

I believe, the best way is to think MODULAR, look for *frameworks*, and pluggable components.  Actually, IBM Watson was made in this way.  I believe, Apple Siri was also made like this.

 

 
  [ # 2 ]

Skynet-AI was built from scratch. It can be a lot of effort and can take a long time before you have anything that can be conversational.

To start I suggest you take a look at this thread:
http://www.chatbots.org/ai_zone/viewthread/492/

Some of the choices you need to consider:

Where do I want my bot to live? (Internet or desktop)

How should the knowledge be stored, if it is going to be moved to a new interpreter later the data needs to be in a neutral format.

Do I want to create my own interpreter? (Can be a good learning experience, but there are interpreters that are already out there if you just want to concentrate on the natural language and personality part. There are also NLP tool kits that may help.)

What do I want my bot to do? (Avatar, speech recognition, launch programs, IRC, etc)

If you do build it from the ground up, start by building tools that will help you build what you want. (If you gave me an hour to chop down a tree, I’d spend the firs 45 minutes sharpening the axe.)

Also, look around at other implementations. They will give you ideas about what/who you might like to build your project.

 

 

 
  [ # 3 ]

About the only thing I would add to what Marcus and Merlin have said is to “play to your strengths”. If you’re good at programming in Python, then by all means, use it. If, however, you would need to learn Python just to get started, I would recommend using another language, instead. The more things you have to learn in order to attain the goals you’ve set yourself, the longer it will take for you to achieve those goals.

Also, even if you want to literally “start from scratch”, it’s still a very good idea to examine various other solutions of that type that are already out there, in order to get an idea of “how it’s done”, and to possibly avoid pitfalls that others have come across. We achieve so much more if we “stand upon the shoulders of giants” (as the saying goes) than if we just re-invent our own personal wheels.

Anyway, I wish you the best of luck with your project, and if there’s anything I (or the rest of the community) can do to help, all that you need do is ask. smile

Oh, and welcome to chatbots.org! :D

 

 
  [ # 4 ]

I agree with Dave that you should use the language you are most comfortable with, especially when you’re just hacking together code in the beginning. That being said, I did the exact opposite and learned python just for chatbot development. smile My strongest language at the time was C++, which proved to be cumbersome for string handling. I’m so glad I made the switch. Victor also began with a more string-friendly language (perl) before switching to a faster language (C++), so maybe he can offer some words of wisdom as to how easy that process is.

Python has many NLP resources available to get you started—something I wish I’d investigated sooner. If you haven’t yet, check out the Natural Language ToolKit. I use it’s WordNet interface as my go-to dictionary and thesaurus, and I’m currently looking at using it to supplement my pos tagging algorithms. NLTK also has full context-free parsing capabilities, which could be useful, depending on what part of chatbot development you’re most interested in. Since my own work is more concerned with context-based NLP, I’m building my own algorithms for parsing. But if you want to get a bot that “talks back” out the gate sooner, it might be better to start with developed tools.

Good luck in your work, and do keep the forum updated on your progress!

 

 
  [ # 5 ]

Tto clarify i know python as my first and main language. I am currently learning C++ and in the future might use it for speed. If someone could point me towards the source code of a working chat bot so i can try to see how to approach this since I am at a standstill.

 

 
  [ # 6 ]
James Fontenot - Aug 19, 2011:

[...]If someone could point me towards the source code of a working chat bot so i can try to see how to approach this since I am at a standstill.

http://www.scn.org/~mentifex/AiMind.html is the free AI source code in JavaScript of a True AI chatbot that I have been working on since 2001.

JavaScript! (Don’t laugh.)

http://www.kokogiak.com/projects/seawft/reveal_1b.html is some pretty spectacular JavaScript showing my Seattle WA USA home town.

 

 
  [ # 7 ]

Good to see Arthur is still plugging his “true ai”...

 

 
  [ # 8 ]
James Fontenot - Aug 19, 2011:

Tto clarify i know python as my first and main language. I am currently learning C++ and in the future might use it for speed. If someone could point me towards the source code of a working chat bot so i can try to see how to approach this since I am at a standstill.

There is complete source code for a very simple Eliza program in this thread here http://www.chatbots.org/ai_zone/viewreply/6504/

It is written in Common Lisp and should be pretty easy to run with just about any decent Common Lisp implementation.

If you are in the process of learning a new language for programming projects using artificial intelligence then you cannot do better than Common Lisp. It is easy to learn and much more powerful and productive to use than languages like Java and C++. The only downside is that it needs a supercomputer to run it, but who doesn’t have a supercomputer on their desktop nowadays anyway?

 

 

 
  [ # 9 ]
Steve Worswick - Aug 20, 2011:

Good to see Arthur is still plugging his “true ai”...

Good to see Steve is still trying to plug Arthur. smile

 

 

 
  [ # 10 ]
James Fontenot - Aug 19, 2011:

If someone could point me towards the source code of a working chat bot so i can try to see how to approach this since I am at a standstill.

Chatbots work in so many different ways. What type of bot do you want to make? I don’t think looking at someone else’s source code will help you do much besides re-invent their wheel.

It’s easy enough to set up a litany of if/then statements to provide an output for each user input. If you know reg ex this approach can become quite sophisticated. If you want to add more context and NLP, then I suggest looking into the NLTK resources I mentioned before. Picking up a grammar book doesn’t hurt either.

If you have any specific python questions, I’ll try to help if I can.

 

 
  [ # 11 ]

> http://meta-guide.com/home/ai-engine/python-resources

James, I’ve made a webpage listing “Python Resources” (above), which includes many Python based chatbots of various kinds, among other potentially useful resources.

Should you find it helpful, you may buy me beer via the PayPal Donate button on my blog at http://mendicott.com .  ;^)

 

 
  [ # 12 ]
Arthur T Murray - Aug 19, 2011:

http://www.kokogiak.com/projects/seawft/reveal_1b.html is some pretty spectacular JavaScript showing my Seattle WA USA home town.

Is that old growth behind the space needle? :(

 

 
  [ # 13 ]

I know that this is now going to be a confirmed case of “thread hijacking”, but when I see a page like that link that Arthur provided, which requires a specific browser to function correctly, it attacks my sense of “rightness”, and I have to fiddle with the code. Thus, I’ve come up with this page. It works in all the major browsers, and has a couple of “improvements”, in that not only does it “auto-scroll” when you move the divider towards the edges of the screen, but the text on the page also moves to match the left edge of the viewport.

Ok, I feel better now. We can now all return to the topic at hand. smile

 

 
  [ # 14 ]

lol, well done Dave. smile

 

 
  [ # 15 ]

Thank you, my dear. It’s not “rocket surgery”, but it’s something I can do well. smile

 

 1 2 > 
1 of 2
 
  login or register to react