# Content-Based-Movie-Recommender-System-with-sentiment-analysis-using-AJAX
![Python](https://img.shields.io/badge/Python-3.8-blueviolet)
![Framework](https://img.shields.io/badge/Framework-Flask-red)
![Frontend](https://img.shields.io/badge/Frontend-HTML/CSS/JS-green)
![API](https://img.shields.io/badge/API-TMDB-fcba03)
**Updated version of this application can be found at:** https://github.com/kishan0725/The-Movie-Cinema
Content Based Recommender System recommends movies similar to the movie user likes and analyses the sentiments on the reviews given by the user for that movie.
The details of the movies(title, genre, runtime, rating, poster, etc) are fetched using an API by TMDB, https://www.themoviedb.org/documentation/api, and using the IMDB id of the movie in the API, I did web scraping to get the reviews given by the user in the IMDB site using `beautifulsoup4` and performed sentiment analysis on those reviews.
Check out the live demo: https://mrswsa.herokuapp.com/
Link to youtube demo: https://www.youtube.com/watch?v=dhVePtyECFw
# Note
> #### Use this URL - https://the-movie-buff.herokuapp.com/ - in case if you see application error in the above mentioned URL
## The Movie Cinema
I've developed a similar application called "The Movie Cinema" which supports all language movies. But the only thing that differs from this application is that I've used the TMDB's recommendation engine in "The Movie Cinema". The recommendation part developed by me in this application doesn't support for multi-language movies as it consumes 200% of RAM (even after deploying it to Heroku) for generating Count Vectorizer matrix for all the 700,000+ movies in the TMDB.
Link to "The Movie Cinema" application: https://the-movie-cinema.herokuapp.com/
Don't worry if the movie that you are looking for is not auto-suggested. Just type the movie name and click on "enter". You will be good to go eventhough if you made some typo errors.
Source Code: https://github.com/kishan0725/The-Movie-Cinema
## Featured in Krish's Live Session on YouTube
[![krish youtube](https://github.com/kishan0725/AJAX-Movie-Recommendation-System-with-Sentiment-Analysis/blob/master/static/krish-naik.PNG)](https://www.youtube.com/watch?v=A_78fGgQMjM)
## How to get the API key?
Create an account in https://www.themoviedb.org/, click on the `API` link from the left hand sidebar in your account settings and fill all the details to apply for API key. If you are asked for the website URL, just give "NA" if you don't have one. You will see the API key in your `API` sidebar once your request is approved.
## How to run the project?
1. Clone or download this repository to your local machine.
2. Install all the libraries mentioned in the [requirements.txt](https://github.com/kishan0725/Movie-Recommendation-System-with-Sentiment-Analysis/blob/master/requirements.txt) file with the command `pip install -r requirements.txt`
3. Get your API key from https://www.themoviedb.org/. (Refer the above section on how to get the API key)
3. Replace YOUR_API_KEY in **both** the places (line no. 15 and 29) of `static/recommend.js` file and hit save.
4. Open your terminal/command prompt from your project directory and run the file `main.py` by executing the command `python main.py`.
5. Go to your browser and type `http://127.0.0.1:5000/` in the address bar.
6. Hurray! That's it.
## Architecture
![Recommendation App](https://user-images.githubusercontent.com/36665975/168742738-5435cf76-1a42-4d87-94b4-999e5bfc48d3.png)
## Similarity Score :
How does it decide which item is most similar to the item user likes? Here come the similarity scores.
It is a numerical value ranges between zero to one which helps to determine how much two items are similar to each other on a scale of zero to one. This similarity score is obtained measuring the similarity between the text details of both of the items. So, similarity score is the measure of similarity between given text details of two items. This can be done by cosine-similarity.
## How Cosine Similarity works?
Cosine similarity is a metric used to measure how similar the documents are irrespective of their size. Mathematically, it measures the cosine of the angle between two vectors projected in a multi-dimensional space. The cosine similarity is advantageous because even if the two similar documents are far apart by the Euclidean distance (due to the size of the document), chances are they may still be oriented closer together. The smaller the angle, higher the cosine similarity.
![image](https://user-images.githubusercontent.com/36665975/70401457-a7530680-1a55-11ea-9158-97d4e8515ca4.png)
More about Cosine Similarity : [Understanding the Math behind Cosine Similarity](https://www.machinelearningplus.com/nlp/cosine-similarity/)
### Sources of the datasets
1. [IMDB 5000 Movie Dataset](https://www.kaggle.com/carolzhangdc/imdb-5000-movie-dataset)
2. [The Movies Dataset](https://www.kaggle.com/rounakbanik/the-movies-dataset)
3. [List of movies in 2018](https://en.wikipedia.org/wiki/List_of_American_films_of_2018)
4. [List of movies in 2019](https://en.wikipedia.org/wiki/List_of_American_films_of_2019)
5. [List of movies in 2020](https://en.wikipedia.org/wiki/List_of_American_films_of_2020)
没有合适的资源?快使用搜索试试~ 我知道了~
基于内容的推荐系统,推荐与用户喜欢的电影相似的电影,并分析用户给出的评论的情绪.zip
共26个文件
csv:6个
ipynb:5个
txt:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 150 浏览量
2023-03-29
22:57:59
上传
评论
收藏 2.71MB ZIP 举报
温馨提示
基于内容的推荐系统,推荐与用户喜欢的电影相似的电影,并分析用户给出的评论的情绪.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于内容的推荐系统,推荐与用户喜欢的电影相似的电影,并分析用户给出的评论的情绪.zip (26个子文件)
AJAX-Movie-Recommendation-System-with-Sentiment-Analysis-master
main_data.csv 1015KB
nlp_model.pkl 63KB
main.py 6KB
tranform.pkl 57KB
templates
home.html 4KB
recommend.html 7KB
datasets
reviews.txt 437KB
main_data.csv 1015KB
new_data.csv 898KB
data.csv 469KB
final_data.csv 991KB
movie_metadata.csv 1.42MB
Procfile 22B
requirements.txt 269B
static
style.css 4KB
image.jpg 305KB
autocomplete.js 2KB
krish-naik.PNG 345KB
recommend.js 8KB
loader.gif 226KB
.ipynb_checkpoints
sentiment.ipynb 8KB
preprocessing 1.ipynb 94KB
preprocessing 3.ipynb 110KB
preprocessing_4.ipynb 77KB
preprocessing 2.ipynb 70KB
README.md 5KB
共 26 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功