Coder Social home page Coder Social logo

harshshrivastava27 / movie-recommender-reviewsentiment- Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 7.26 MB

Content-Based Recommender System recommends movies similar to the movie user searches and analyses the sentiments on the reviews given by the user for that movie.

Home Page: https://movrecsentiment.herokuapp.com/

Python 1.71% JavaScript 2.88% CSS 1.25% HTML 3.38% Jupyter Notebook 90.78%
python nlp api machine-learning sentiment-analysis recommendation-system ajax-request ajax

movie-recommender-reviewsentiment-'s Introduction

Content-Based-Movie-Recommender-System-with-sentiment-analysis-using-AJAX

Python Framework Frontend API

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://movrecsentiment.herokuapp.com/

Note

Movie Recommender using tmDB API

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.

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 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)
  4. Replace YOUR_API_KEY in both the places (line no. 15 and 29) of static/recommend.js file and hit save.
  5. Open your terminal/command prompt from your project directory and run the file main.py by executing the command python main.py.
  6. Go to your browser and type http://127.0.0.1:5000/ in the address bar.
  7. Hurray! That's it.

Architecture

IMG-20210306-WA0012

Similarity Score :

How does it decide which item is most similar to the item user likes? Here we use 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

More about Cosine Similarity : Understanding the Math behind Cosine Similarity

Sources of the datasets

  1. IMDB 5000 Movie Dataset
  2. The Movies Dataset
  3. List of movies in 2018
  4. List of movies in 2019
  5. List of movies in 2020
  6. IMDB 50k review dataset

movie-recommender-reviewsentiment-'s People

Contributors

harshshrivastava27 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.