Christian Thone
@christiant
All you have to do is talk to her and she will try to answer you based on what she knows, if she doesn't know how to respond she will ask you to tell
Python
CodeLongAndPros Also, there is the chatterbot lib, if you don’t want to make yours from scratch.3 years ago
JoeyLent You should use .json files instead of .txt files. JSON files are basically Python dictionaries. For example, the json file where the responses are stored could look like this:
{
"Hello": "Hey there!",
"How are you?": "I'm doing good!"
"Tell me a joke": 1
}
The 1 can be used a code for the program, telling it to tell the user a joke.
As @CodeLongAndPros mentioned, parsing (reading and understanding) the text will be a problem. Chat bots are a really difficult thing to program, and so far 3 years ago
CodeLongAndPros This is really cool, but I have one comment.
Due to your checking of the text, you can have nonsense be a valid statement
image
3 years ago