Srikant Sahu
Srikant Sahu

Reputation: 849

How to create a train data for python chatterbot so that it can understand numeric values using ListTrainer

I am looking for a way to train the Python Chaterbot (https://chatterbot.readthedocs.io/en/stable/#) on some numeric data so that it can understand the user input using ListTrainer.

Ex: Bot : How many tickets do you need? User: 500 Bot: thats a huge number. Sorry I cannot process that.

In the above scenario, I can create a dialogue to make the bot understand that 500 is big number. But what if 510, 600 or any number, is there a way the bot can take custom decisions based upon a rule and reply the user.

Any suggestions will be helpful.

Upvotes: 0

Views: 457

Answers (1)

Thanasis Saxanidis
Thanasis Saxanidis

Reputation: 141

If I understand the question correctly the problem is that you want the chatbot to estimates when a number is big or small and gives a specific response. For me, the best option is to find the number in the string, modify it to integer and then compare it with the given variable. Chatterbot can manage mathematical evaluation if you use the MathematicalEvaluation logic adapter instead of BestMatch. I don't think there is an embedded way in the library to give a combined text with strings and numbers and let the chatbot do the trick

Upvotes: 1

Related Questions