I am trying to make a chatbot and to do that i have to perform two main task 1st is Intent Classification and other is Entity recognition but i stuck in Intent classification. Basically i am developing a chatbot for Ecommerce site and my chatbot have very specific use case, my chatbot has to negotiate with customers on the price of products, thats it. To keep things simple and easy i am just considering 5 intents.
- Ask for price
- Counter Offer
- negotiation
- success
- Buy a product
To train a classifier on these intents i have trained a Naive Bayes classifier on my little hand written corpus of data, but that data is too too and too less to train a good classifier. I have searched on internet a lot and looked into every machine learning data repository (kaggle, uci, etc) but cannot find any data for my such specific use case. Can you guys guide me what should i do in that case. If i got a big data like i want then i will try Deep learning classifier which will far better for me. Any help would be highly appreciated.
from textblob.classifiers import NaiveBayesClassifier
import joblib # This is used to save the trained classifier in pickle format
training_data = [
('i want to buy a jeans pent', 'Buy_a_product'),
('i want to purchase a pair of shoes', 'Buy_a_product'),
('are you selling laptops', 'Buy_a_product'),
('i need an apple jam', 'Buy_a_product'),
('can you please tell me the price of this product', 'Buy_a_product'),
('please give me some discount.', 'negotition'),
("i cannot afford such price", 'negotition'),
("could you negotiate", "negotition"),
("i agree on your offer", "success"),
("yes i accepcted your offer", "success"),
("offer accepted", "success"),
("agreed", "success"),
("what is the price of this watch", "ask_for_price"),
("How much it's cost", "ask_for_price"),
("i will only give you 3000 for this product", "counter_offer"),
("Its too costly i can only pay 1500 for it", "counter_offer"),
]
clf = NaiveBayesClassifier(training_data)
joblib.dump(clf, 'intentClassifier.pkl')