Important alert: (current site time 7/15/2013 6:15:53 PM EDT)
 

winzip icon

A.I Program - Chatterbot Eliza v2.0 (c++ eliza)

Email
Submitted on: 3/20/2006 9:05:14 PM
By: Gonzales Cenelia  
Level: Advanced
User Rating: By 7 Users
Compatibility: C++ (general), Microsoft Visual C++
Views: 30554
author picture
(About the author)
 
     I HAVE POSTED THIS CODE TO SOME OTHER WEBSITES (CODEPROJECT.COM AND OTHERS) AND I HAVE RECEIVE SOME VERY GOOD FEEDBACKS ABOUT IT. I KNOW THAT THIS CHATBOT IS FAIRLY SMART, SO DONT FORGET TO VOTE FOR ME! This version of the program is smarter than ever, more new features have been added since the last submission and also now the conversation log between the users and the chatbot are automaticaly saved into the file: log.txt And finaly the "script file" (script.txt) wich acts as a knowledge base for the chatbot has been totaly rewritten and it is definitly better than in the previous versions of the program. These program is an Eliza like chatterbot,bots like Eliza are the results of researchs in Artificial Intelligence (more specificly: in NLP and NLU) NLP: Natural Language Processing, NLU: Natural Language Understanding The first chatterbot was published in 1966 by Joseph Weizenbaum a professor of MIT. (http://i5.nyu.edu/~mm64/x52.9265/january1966.html) And also,most of the chatterbots that have been written this days are largely based on the original chatterbot Eliza that was written by Joseph Weizenbaum which means that they use some appropriate keywords to select the responses to generate when they get new inputs from the users. More generaly,the technique that are in use in a "chatterbot database" or "script file" to represent the chatterbot knowledge is known as "Case Base Reasoning" or CBR. A very good example of an Eliza like chatterbot would be "Alice",these program has won the Loebner prize for most human chatterbot three times (www.alicebot.org). The goal of NLP and NLU is to create programs that are capable of understanding natural languages and also capable of processing it to get input from the user by "voice recognition" or to produce output by "text to speech". During the last decades there has been a lot of progress in the domains of "Voice Recognition" and "Text to Speech",however the goal of NLU that is to make software that are capable of showing a good level of understanding of "natural languages" in general seems quiet far to many A.I experts. The general view about this subject is that it would take at list many decades before any computer can begin to really understand "natural language" just as the humans do. These code is Copyrighted and has limited warranty. There are many interesting features in the current program,these chatterbot is capable of avoiding repetitions when selecting new responses,it can also follow the context of a conversation with a user. When the programs detect new keywords that are not part of the "script file", it saves it on the file "unknown.txt" and finaly it simulates a "human typist" when displaying responses on the screen. Actualy,there are many more features in the program,you will be capable of finding them by reading the "source code". The implementation of the program has been improved, the repetitions made by the program are better handled, the context in a conversation is also better handled, the program can now correct grammatical errors that can occure after conjugating verbs. Finaly, the database is bigger than the last time, it includes some of the script that originaly was used in the first implementation of the chatterbot Eliza by Joseph Weizenbaum.

 

INCLUDE files:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
//**************************************
//INCLUDE files for :A.I Program - Chatterbot Eliza v2.0 (c++ eliza)
//**************************************
#include "recorder.h"
#include "strings.h"
#include "tokenizer.h"
#include <windows.h>
#include <sstream>
#include <fstream>
#include <stack>
#include <ctime>
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 49 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

3/14/2006 2:40:22 PMBrenton Andrew Saunders

I love chatterbots! 5/5 from me!
(If this comment was disrespectful, please report it.)

 
3/31/2006 1:12:33 AMMamerto Fabian Jr.

Is this the updated version as the original?
Very nice. Thanks for sharing. ***** for you.
(If this comment was disrespectful, please report it.)

 
4/18/2006 2:10:59 AMchokri

salut
(If this comment was disrespectful, please report it.)

 
8/11/2006 4:50:15 PMKnightEnker

This program is really good. 10/10 from me. Although it is really annoying at times. It needs to learn more about itself.
(If this comment was disrespectful, please report it.)

 
12/29/2007 7:18:44 AMscott raine

i luv this thing ive merged it with my current project so it speaks when it outputs words.
(If this comment was disrespectful, please report it.)

 
8/25/2010 10:59:10 PMlegofreak73

it gives me an error saying "fatal error C1083: cannot open include file 'eliza.h'. No such file or directory." WHAT SHOULD I DO?
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.