Shefali Munjal, Rency Joseph, Narasa Kumar and Ritu Singh.
Using Slack channel as GUI for users, this chatbot uses Machine Learning models to answer user's questions and answers accurately. Our reference has been http://scikit-learn.org/stable/tutorial/text_analytics/working_with_text_data.html.
The chatbot uses SVM Machine Learning algorithm in scikit library for classifying the questions. Our tests currently indicate an accuracy of around 98%.
Users can use their laptop inbuilt microphone to ask chatbot as voice input. The server listens to microphone and processes in the server, replies back to slack channel. The server also converts the output response as voice and plays to user.
The chatbot was trained by a model with questions were generated to JSpeech Grammar Format (JSGF).
The JSpeech Grammar Format (JSGF) is a platform-independent, vendor-independent textual representation of grammars for use in speech recognition.
Grammars are used by speech recognizers to determine what the recognizer should listen for, and so describe the utterances a user may say.
JSGF adopts the style and conventions of the JavaTM Programming Language in addition to use of traditional grammar notations.
Remembers the class, and user need not to specify course name each time. First time, the user asks any question, he needs to mention the course and section name.
Thereafter, the system remembers the context and he does not need to specify the same again unless he needs details for a different course/section.
The input to this system is the greensheet data from MySQL database. User can train this system with any number of greensheets.
Currently the system has been trained for data from 2 greensheets -CMPE27301 and CMPE272-2.
The python server is deployed on EC2 and it is highly scalable. The database used was mySQL on Amazon RDS and is capable of serving millions of
requests concurrently.
sly
pymysql
slackclient
numpy
scipy
scikit-learn
patternpip install sly pymysql slackclient numpy scipy scikit-learn patternor
pip install -r requirements.txtThe code uses database configuration from environment variables, make sure to add them
export DB_HOST='localhost'
export DB_USER=root
export DB_PASS=''export SLACK_BOT_TOKEN='xoxb-175807218647-HL9jcD2OAzBxgj5G0QBrwcfX'
export BOT_ID='U55PR6EK1'mysql -h $DB_HOST -u $DB_USER < scripts/sql/scripts.sql
mysql -h $DB_HOST -u $DB_USER < scripts/sql/insert.sqlpip install SpeechRecognition
sudo apt install linuxbrew-wrapper
brew install portaudio && sudo brew link portaudio
pip install pyaudiosudo pip install gtts
sudo apt-get install mpg321
brew install portaudio && sudo brew link python scripts/server/jarvis.pyNow, the chatbot is active and add the slack bot to any slack channel. To invoke the chatbot, use @jarvis (or @{chatbot_name} for a diffrent chatbot) to ask any question. The chatbot is completely conversational, meaning it remembers the course name for all next set of classes. Use reset keyword to reset the previous conversation.