Code Monkey home page Code Monkey logo

natural-language-movie-recommendations's Introduction

Natural-Language-Movie-Recommendations

Movie recommendations based on user written passages about preferred movies. Final project for Metis Immersive Data Science Program. Example app built on this project is featured here.


Overview

Modern media recommendations within services such as Netflix and Spotify follow a shotgun approach. User's are presented large quantities of recommendations based on media that they have previously consumed and rated. Although a user is likely to enjoy the presented recommendations, these recommendations may not reflect what a user wants at the specific moment. The shotgun approach may also cause decision paralysis wherein a user is overwhelmed by the quantity of choices.

The goal of this project is to build a recommendation engine based on a user's written passage about their preferences. In this way a user can describe specifically what they are looking for and recieve a recommendation that follows suit.

This Github repo contains 3 files that are used to power a movie recommendation engine based on natural language user inputs:

  1. movies_dataset_engineering.ipynb: This notebook file is used to load in The Movies Dataset from Kaggle and create a variety of pickle objects used to power the recommendation engine.
  2. entity_sentiment.py: This file contains a variety of functions used to determine sentiment towards a specific entity mentioned in text. In this case the entities are intended to be movies, actors, and genres, however these functions are agnostic towards the movie domain and could be applied more broadly. The functions leverage the Stanford Dependency Parser and Vader Sentiment package.
  3. recommendations.py: This file contains functions used to generate recommendations. It imports entity_sentiment.py and uses the contained functions to establish user preferences. Movies are compared based on similarity of their synopses and thematic keywords. Facet searching is incorporated for strongly liked or disliked actors and genres.

Using this Repo

In order to recreate this project follow the steps outlined below:

  1. Download The Movies Dataset from Kaggle, unzip, and place the files within your project in a folder named the-movies-dataset.
  2. Install the required libraries: nltk, vaderSentiment, gensim, sklearn, numpy, pandas, etc. The Stanford Dependency Parser must be downloaded from this link and requires a java installation. You must provide the path to your java installation and the stanford dependency parser files within entity_sentiments.py.
  3. Run movies_dataset_engineering.ipynb to load The Movies Dataset and create pickle objects that allow the recommendation engine to operate quickly and with minimal RAM. Afterwards the original The Movies Dataset files can be deleted.
  4. Open a python notebook or terminal within your project directory and import recommendations.py. Calling the function recommendations.full_rec_pipeline('some text about movies') will generate a string that acknowledges your preferences and suggests a movie to watch.

OR

Use the functions from entity_sentiment.py for your own project. These functions are agnostic to movies and recommendations. They possess much broader applications and could be used for any project that requires determining sentiment towards specific people, places, or things.

natural-language-movie-recommendations's People

Contributors

alexmuhr avatar

Watchers

 avatar  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.