Movie Recommendation in Conversational
Steps To Run projects
skill-sam.json file in nlp
pip install pandas
pip install numpy
pip install sklearn
pip install nltk
python -m nltk.downloader stopwords
python -m nltk.downloader punkt
pip install slackclient
pip install ibm-watson
Please make sure that you modified the API details both for Slack and Watson in the config.py file
The data for this example is downloaded from the location below,
https://www.kaggle.com/rounakbanik/movie-recommender-systems/data
Name of the dataset - movies_metadata.csv
Navigate to the folder where the main.py file resides and execute the code below.
python nlp/nlp_solutions/onetime_run_file.py
This will create the "onetime.txt" file automatically. If you need to rename this file, update the name in "config.py" file.
Navigate to the folder where the main python script exists and run the code below.
python main.py
Users can interact with Sam via Slack. Once the user post a question via the interface, the question is passed to the backend system for analysis
All the natural language processing happens in step 2.
After the NLP processing is completed, we have three outputs from it
- Intents - What the user is trying to ask or query?
- Entities - What is the exact field or column they are looking for?
- Dialog/Interaction - Provide the appropriate request/response for the user question.
Currently, the data resides in a excel file. However, you can add multiple databases/excel files if needed, to access different sources. Based on the results from step 3, the appropriate database/excel file is queried and the results are returned.
The results obtained from the backend is posted to user via Slack
The interactions between the users are logged and stored in a flatfile format in a log file. Also, if the bot is not able to identify the user questions it will add those questions to a followup file.