Question Classifier for Industrial Chatbots in Python
By Akash Chauhan
This project is made in Python and is basically a classifier for chatbots that can be used to classify questions and improve customer service flow.
This Python project runs on the Naive Bayes Classification Model and tries to calculate the probability of the 'type' of the question by breaking the long question into words and then calculating the probability for each occurrence of the word. The labeled data used for training of this model classifies the question into the types 'Who', 'What', 'When', 'How','Affirmation', and 'Unknown'. This is because of the data used for training. This also recognizes the nuances of grammar. Suppose, you want to ask when does the train leaves, it is 'when' type of question but if you ask 'What time the train leaves?', it doesn't change the question type and gives the result as 'when'. It can be implemented into the chatbots for companies modified according to the product needs and what service they can provide to the customers.
This project is made for classifying into the above-mentioned type but this can be modified for companies who provide service through telecommunication service. For instance, when we try to call the flight company for any kind of assistance, we are given a menu to choose the relevant assistance so that it reaches the appropriate department and we can get further assistance. Suppose the same thing is happening on a chatbot, how will it differentiate which department to reach, this problem gets solved using this chatbot. This can be done by modifying the training data accordingly.
How to use: Run the program all at once. You'll be prompted to give inputs in the Python console. Once you give inputs, the model will give output according to the dataset I've used. In case you need a different dataset, you can import a different one but in the same format as I've used. Since this program uses print statements to give output in the Python Console, you can not print it and integrate with different python programs.
Comments