diff --git "a/Movie Recommender System.ipynb" "b/Movie Recommender System.ipynb" deleted file mode 100644--- "a/Movie Recommender System.ipynb" +++ /dev/null @@ -1,4026 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 2, - "id": "5c104a02", - "metadata": {}, - "outputs": [], - "source": [ - "import pandas as pd\n", - "import numpy as np" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "874c70e9", - "metadata": {}, - "outputs": [], - "source": [ - "movies = pd.read_csv('tmdb_5000_movies.csv')\n", - "credits= pd.read_csv('tmdb_5000_credits.csv')" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "8ac2cf77", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
budgetgenreshomepageidkeywordsoriginal_languageoriginal_titleoverviewpopularityproduction_companiesproduction_countriesrelease_daterevenueruntimespoken_languagesstatustaglinetitlevote_averagevote_count
0237000000[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam...http://www.avatarmovie.com/19995[{\"id\": 1463, \"name\": \"culture clash\"}, {\"id\":...enAvatarIn the 22nd century, a paraplegic Marine is di...150.437577[{\"name\": \"Ingenious Film Partners\", \"id\": 289...[{\"iso_3166_1\": \"US\", \"name\": \"United States o...2009-12-102787965087162.0[{\"iso_639_1\": \"en\", \"name\": \"English\"}, {\"iso...ReleasedEnter the World of Pandora.Avatar7.211800
1300000000[{\"id\": 12, \"name\": \"Adventure\"}, {\"id\": 14, \"...http://disney.go.com/disneypictures/pirates/285[{\"id\": 270, \"name\": \"ocean\"}, {\"id\": 726, \"na...enPirates of the Caribbean: At World's EndCaptain Barbossa, long believed to be dead, ha...139.082615[{\"name\": \"Walt Disney Pictures\", \"id\": 2}, {\"...[{\"iso_3166_1\": \"US\", \"name\": \"United States o...2007-05-19961000000169.0[{\"iso_639_1\": \"en\", \"name\": \"English\"}]ReleasedAt the end of the world, the adventure begins.Pirates of the Caribbean: At World's End6.94500
2245000000[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam...http://www.sonypictures.com/movies/spectre/206647[{\"id\": 470, \"name\": \"spy\"}, {\"id\": 818, \"name...enSpectreA cryptic message from Bond’s past sends him o...107.376788[{\"name\": \"Columbia Pictures\", \"id\": 5}, {\"nam...[{\"iso_3166_1\": \"GB\", \"name\": \"United Kingdom\"...2015-10-26880674609148.0[{\"iso_639_1\": \"fr\", \"name\": \"Fran\\u00e7ais\"},...ReleasedA Plan No One EscapesSpectre6.34466
3250000000[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 80, \"nam...http://www.thedarkknightrises.com/49026[{\"id\": 849, \"name\": \"dc comics\"}, {\"id\": 853,...enThe Dark Knight RisesFollowing the death of District Attorney Harve...112.312950[{\"name\": \"Legendary Pictures\", \"id\": 923}, {\"...[{\"iso_3166_1\": \"US\", \"name\": \"United States o...2012-07-161084939099165.0[{\"iso_639_1\": \"en\", \"name\": \"English\"}]ReleasedThe Legend EndsThe Dark Knight Rises7.69106
4260000000[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam...http://movies.disney.com/john-carter49529[{\"id\": 818, \"name\": \"based on novel\"}, {\"id\":...enJohn CarterJohn Carter is a war-weary, former military ca...43.926995[{\"name\": \"Walt Disney Pictures\", \"id\": 2}][{\"iso_3166_1\": \"US\", \"name\": \"United States o...2012-03-07284139100132.0[{\"iso_639_1\": \"en\", \"name\": \"English\"}]ReleasedLost in our world, found in another.John Carter6.12124
\n", - "
" - ], - "text/plain": [ - " budget genres \\\n", - "0 237000000 [{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam... \n", - "1 300000000 [{\"id\": 12, \"name\": \"Adventure\"}, {\"id\": 14, \"... \n", - "2 245000000 [{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam... \n", - "3 250000000 [{\"id\": 28, \"name\": \"Action\"}, {\"id\": 80, \"nam... \n", - "4 260000000 [{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam... \n", - "\n", - " homepage id \\\n", - "0 http://www.avatarmovie.com/ 19995 \n", - "1 http://disney.go.com/disneypictures/pirates/ 285 \n", - "2 http://www.sonypictures.com/movies/spectre/ 206647 \n", - "3 http://www.thedarkknightrises.com/ 49026 \n", - "4 http://movies.disney.com/john-carter 49529 \n", - "\n", - " keywords original_language \\\n", - "0 [{\"id\": 1463, \"name\": \"culture clash\"}, {\"id\":... en \n", - "1 [{\"id\": 270, \"name\": \"ocean\"}, {\"id\": 726, \"na... en \n", - "2 [{\"id\": 470, \"name\": \"spy\"}, {\"id\": 818, \"name... en \n", - "3 [{\"id\": 849, \"name\": \"dc comics\"}, {\"id\": 853,... en \n", - "4 [{\"id\": 818, \"name\": \"based on novel\"}, {\"id\":... en \n", - "\n", - " original_title \\\n", - "0 Avatar \n", - "1 Pirates of the Caribbean: At World's End \n", - "2 Spectre \n", - "3 The Dark Knight Rises \n", - "4 John Carter \n", - "\n", - " overview popularity \\\n", - "0 In the 22nd century, a paraplegic Marine is di... 150.437577 \n", - "1 Captain Barbossa, long believed to be dead, ha... 139.082615 \n", - "2 A cryptic message from Bond’s past sends him o... 107.376788 \n", - "3 Following the death of District Attorney Harve... 112.312950 \n", - "4 John Carter is a war-weary, former military ca... 43.926995 \n", - "\n", - " production_companies \\\n", - "0 [{\"name\": \"Ingenious Film Partners\", \"id\": 289... \n", - "1 [{\"name\": \"Walt Disney Pictures\", \"id\": 2}, {\"... \n", - "2 [{\"name\": \"Columbia Pictures\", \"id\": 5}, {\"nam... \n", - "3 [{\"name\": \"Legendary Pictures\", \"id\": 923}, {\"... \n", - "4 [{\"name\": \"Walt Disney Pictures\", \"id\": 2}] \n", - "\n", - " production_countries release_date revenue \\\n", - "0 [{\"iso_3166_1\": \"US\", \"name\": \"United States o... 2009-12-10 2787965087 \n", - "1 [{\"iso_3166_1\": \"US\", \"name\": \"United States o... 2007-05-19 961000000 \n", - "2 [{\"iso_3166_1\": \"GB\", \"name\": \"United Kingdom\"... 2015-10-26 880674609 \n", - "3 [{\"iso_3166_1\": \"US\", \"name\": \"United States o... 2012-07-16 1084939099 \n", - "4 [{\"iso_3166_1\": \"US\", \"name\": \"United States o... 2012-03-07 284139100 \n", - "\n", - " runtime spoken_languages status \\\n", - "0 162.0 [{\"iso_639_1\": \"en\", \"name\": \"English\"}, {\"iso... Released \n", - "1 169.0 [{\"iso_639_1\": \"en\", \"name\": \"English\"}] Released \n", - "2 148.0 [{\"iso_639_1\": \"fr\", \"name\": \"Fran\\u00e7ais\"},... Released \n", - "3 165.0 [{\"iso_639_1\": \"en\", \"name\": \"English\"}] Released \n", - "4 132.0 [{\"iso_639_1\": \"en\", \"name\": \"English\"}] Released \n", - "\n", - " tagline \\\n", - "0 Enter the World of Pandora. \n", - "1 At the end of the world, the adventure begins. \n", - "2 A Plan No One Escapes \n", - "3 The Legend Ends \n", - "4 Lost in our world, found in another. \n", - "\n", - " title vote_average vote_count \n", - "0 Avatar 7.2 11800 \n", - "1 Pirates of the Caribbean: At World's End 6.9 4500 \n", - "2 Spectre 6.3 4466 \n", - "3 The Dark Knight Rises 7.6 9106 \n", - "4 John Carter 6.1 2124 " - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies.head()" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "7cdf354f", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
movie_idtitlecastcrew
019995Avatar[{\"cast_id\": 242, \"character\": \"Jake Sully\", \"...[{\"credit_id\": \"52fe48009251416c750aca23\", \"de...
\n", - "
" - ], - "text/plain": [ - " movie_id title cast \\\n", - "0 19995 Avatar [{\"cast_id\": 242, \"character\": \"Jake Sully\", \"... \n", - "\n", - " crew \n", - "0 [{\"credit_id\": \"52fe48009251416c750aca23\", \"de... " - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "credits.head(1)" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "46f47089", - "metadata": {}, - "outputs": [], - "source": [ - "movies = movies.merge(credits,on='title')" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "1a5bc5a7", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(4809, 23)" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies.shape" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "4e5a42dc", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
budgetgenreshomepageidkeywordsoriginal_languageoriginal_titleoverviewpopularityproduction_companies...runtimespoken_languagesstatustaglinetitlevote_averagevote_countmovie_idcastcrew
0237000000[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam...http://www.avatarmovie.com/19995[{\"id\": 1463, \"name\": \"culture clash\"}, {\"id\":...enAvatarIn the 22nd century, a paraplegic Marine is di...150.437577[{\"name\": \"Ingenious Film Partners\", \"id\": 289......162.0[{\"iso_639_1\": \"en\", \"name\": \"English\"}, {\"iso...ReleasedEnter the World of Pandora.Avatar7.21180019995[{\"cast_id\": 242, \"character\": \"Jake Sully\", \"...[{\"credit_id\": \"52fe48009251416c750aca23\", \"de...
\n", - "

1 rows × 23 columns

\n", - "
" - ], - "text/plain": [ - " budget genres \\\n", - "0 237000000 [{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam... \n", - "\n", - " homepage id \\\n", - "0 http://www.avatarmovie.com/ 19995 \n", - "\n", - " keywords original_language \\\n", - "0 [{\"id\": 1463, \"name\": \"culture clash\"}, {\"id\":... en \n", - "\n", - " original_title overview \\\n", - "0 Avatar In the 22nd century, a paraplegic Marine is di... \n", - "\n", - " popularity production_companies ... runtime \\\n", - "0 150.437577 [{\"name\": \"Ingenious Film Partners\", \"id\": 289... ... 162.0 \n", - "\n", - " spoken_languages status \\\n", - "0 [{\"iso_639_1\": \"en\", \"name\": \"English\"}, {\"iso... Released \n", - "\n", - " tagline title vote_average vote_count movie_id \\\n", - "0 Enter the World of Pandora. Avatar 7.2 11800 19995 \n", - "\n", - " cast \\\n", - "0 [{\"cast_id\": 242, \"character\": \"Jake Sully\", \"... \n", - "\n", - " crew \n", - "0 [{\"credit_id\": \"52fe48009251416c750aca23\", \"de... \n", - "\n", - "[1 rows x 23 columns]" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies.head(1)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "0c3e3c9e", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "Int64Index: 4809 entries, 0 to 4808\n", - "Data columns (total 23 columns):\n", - " # Column Non-Null Count Dtype \n", - "--- ------ -------------- ----- \n", - " 0 budget 4809 non-null int64 \n", - " 1 genres 4809 non-null object \n", - " 2 homepage 1713 non-null object \n", - " 3 id 4809 non-null int64 \n", - " 4 keywords 4809 non-null object \n", - " 5 original_language 4809 non-null object \n", - " 6 original_title 4809 non-null object \n", - " 7 overview 4806 non-null object \n", - " 8 popularity 4809 non-null float64\n", - " 9 production_companies 4809 non-null object \n", - " 10 production_countries 4809 non-null object \n", - " 11 release_date 4808 non-null object \n", - " 12 revenue 4809 non-null int64 \n", - " 13 runtime 4807 non-null float64\n", - " 14 spoken_languages 4809 non-null object \n", - " 15 status 4809 non-null object \n", - " 16 tagline 3965 non-null object \n", - " 17 title 4809 non-null object \n", - " 18 vote_average 4809 non-null float64\n", - " 19 vote_count 4809 non-null int64 \n", - " 20 movie_id 4809 non-null int64 \n", - " 21 cast 4809 non-null object \n", - " 22 crew 4809 non-null object \n", - "dtypes: float64(3), int64(5), object(15)\n", - "memory usage: 901.7+ KB\n" - ] - } - ], - "source": [ - "movies.info()" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "9bb977ce", - "metadata": {}, - "outputs": [], - "source": [ - "# genre\n", - "# id\n", - "# keywords\n", - "# title\n", - "# overview\n", - "# cast \n", - "# crew\n", - "\n", - "movies = movies[['movie_id','title','keywords','genres','overview','cast','crew']]" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "f2c377da", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
movie_idtitlekeywordsgenresoverviewcastcrew
019995Avatar[{\"id\": 1463, \"name\": \"culture clash\"}, {\"id\":...[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam...In the 22nd century, a paraplegic Marine is di...[{\"cast_id\": 242, \"character\": \"Jake Sully\", \"...[{\"credit_id\": \"52fe48009251416c750aca23\", \"de...
\n", - "
" - ], - "text/plain": [ - " movie_id title keywords \\\n", - "0 19995 Avatar [{\"id\": 1463, \"name\": \"culture clash\"}, {\"id\":... \n", - "\n", - " genres \\\n", - "0 [{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam... \n", - "\n", - " overview \\\n", - "0 In the 22nd century, a paraplegic Marine is di... \n", - "\n", - " cast \\\n", - "0 [{\"cast_id\": 242, \"character\": \"Jake Sully\", \"... \n", - "\n", - " crew \n", - "0 [{\"credit_id\": \"52fe48009251416c750aca23\", \"de... " - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies.head(1)" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "4cbc3bb8", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "movie_id 0\n", - "title 0\n", - "keywords 0\n", - "genres 0\n", - "overview 3\n", - "cast 0\n", - "crew 0\n", - "dtype: int64" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies.isnull().sum()" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "fdec68fa", - "metadata": {}, - "outputs": [], - "source": [ - "movies.dropna(inplace=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "8a2edca4", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies.duplicated().sum()" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "id": "519d4d5e", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"name\": \"Adventure\"}, {\"id\": 14, \"name\": \"Fantasy\"}, {\"id\": 878, \"name\": \"Science Fiction\"}]'" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies.iloc[0].genres" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "069d297e", - "metadata": {}, - "outputs": [], - "source": [ - "import ast" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "c1dd1297", - "metadata": {}, - "outputs": [], - "source": [ - "def arrange(text):\n", - " L = []\n", - " for i in ast.literal_eval(text):\n", - " L.append(i['name'])\n", - " return L" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "5d90d6b5", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['Action', 'Adventure', 'Fantasy', 'Science Fiction']" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "arrange('[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"name\": \"Adventure\"}, {\"id\": 14, \"name\": \"Fantasy\"}, {\"id\": 878, \"name\": \"Science Fiction\"}]')" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "fb3f6f70", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
movie_idtitlekeywordsgenresoverviewcastcrew
019995Avatar[{\"id\": 1463, \"name\": \"culture clash\"}, {\"id\":...[Action, Adventure, Fantasy, Science Fiction]In the 22nd century, a paraplegic Marine is di...[{\"cast_id\": 242, \"character\": \"Jake Sully\", \"...[{\"credit_id\": \"52fe48009251416c750aca23\", \"de...
1285Pirates of the Caribbean: At World's End[{\"id\": 270, \"name\": \"ocean\"}, {\"id\": 726, \"na...[Adventure, Fantasy, Action]Captain Barbossa, long believed to be dead, ha...[{\"cast_id\": 4, \"character\": \"Captain Jack Spa...[{\"credit_id\": \"52fe4232c3a36847f800b579\", \"de...
2206647Spectre[{\"id\": 470, \"name\": \"spy\"}, {\"id\": 818, \"name...[Action, Adventure, Crime]A cryptic message from Bond’s past sends him o...[{\"cast_id\": 1, \"character\": \"James Bond\", \"cr...[{\"credit_id\": \"54805967c3a36829b5002c41\", \"de...
349026The Dark Knight Rises[{\"id\": 849, \"name\": \"dc comics\"}, {\"id\": 853,...[Action, Crime, Drama, Thriller]Following the death of District Attorney Harve...[{\"cast_id\": 2, \"character\": \"Bruce Wayne / Ba...[{\"credit_id\": \"52fe4781c3a36847f81398c3\", \"de...
449529John Carter[{\"id\": 818, \"name\": \"based on novel\"}, {\"id\":...[Action, Adventure, Science Fiction]John Carter is a war-weary, former military ca...[{\"cast_id\": 5, \"character\": \"John Carter\", \"c...[{\"credit_id\": \"52fe479ac3a36847f813eaa3\", \"de...
\n", - "
" - ], - "text/plain": [ - " movie_id title \\\n", - "0 19995 Avatar \n", - "1 285 Pirates of the Caribbean: At World's End \n", - "2 206647 Spectre \n", - "3 49026 The Dark Knight Rises \n", - "4 49529 John Carter \n", - "\n", - " keywords \\\n", - "0 [{\"id\": 1463, \"name\": \"culture clash\"}, {\"id\":... \n", - "1 [{\"id\": 270, \"name\": \"ocean\"}, {\"id\": 726, \"na... \n", - "2 [{\"id\": 470, \"name\": \"spy\"}, {\"id\": 818, \"name... \n", - "3 [{\"id\": 849, \"name\": \"dc comics\"}, {\"id\": 853,... \n", - "4 [{\"id\": 818, \"name\": \"based on novel\"}, {\"id\":... \n", - "\n", - " genres \\\n", - "0 [Action, Adventure, Fantasy, Science Fiction] \n", - "1 [Adventure, Fantasy, Action] \n", - "2 [Action, Adventure, Crime] \n", - "3 [Action, Crime, Drama, Thriller] \n", - "4 [Action, Adventure, Science Fiction] \n", - "\n", - " overview \\\n", - "0 In the 22nd century, a paraplegic Marine is di... \n", - "1 Captain Barbossa, long believed to be dead, ha... \n", - "2 A cryptic message from Bond’s past sends him o... \n", - "3 Following the death of District Attorney Harve... \n", - "4 John Carter is a war-weary, former military ca... \n", - "\n", - " cast \\\n", - "0 [{\"cast_id\": 242, \"character\": \"Jake Sully\", \"... \n", - "1 [{\"cast_id\": 4, \"character\": \"Captain Jack Spa... \n", - "2 [{\"cast_id\": 1, \"character\": \"James Bond\", \"cr... \n", - "3 [{\"cast_id\": 2, \"character\": \"Bruce Wayne / Ba... \n", - "4 [{\"cast_id\": 5, \"character\": \"John Carter\", \"c... \n", - "\n", - " crew \n", - "0 [{\"credit_id\": \"52fe48009251416c750aca23\", \"de... \n", - "1 [{\"credit_id\": \"52fe4232c3a36847f800b579\", \"de... \n", - "2 [{\"credit_id\": \"54805967c3a36829b5002c41\", \"de... \n", - "3 [{\"credit_id\": \"52fe4781c3a36847f81398c3\", \"de... \n", - "4 [{\"credit_id\": \"52fe479ac3a36847f813eaa3\", \"de... " - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies['genres'] = movies['genres'].apply(arrange)\n", - "movies.head()" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "id": "c3208f0a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
movie_idtitlekeywordsgenresoverviewcastcrew
019995Avatar[culture clash, future, space war, space colon...[Action, Adventure, Fantasy, Science Fiction]In the 22nd century, a paraplegic Marine is di...[{\"cast_id\": 242, \"character\": \"Jake Sully\", \"...[{\"credit_id\": \"52fe48009251416c750aca23\", \"de...
1285Pirates of the Caribbean: At World's End[ocean, drug abuse, exotic island, east india ...[Adventure, Fantasy, Action]Captain Barbossa, long believed to be dead, ha...[{\"cast_id\": 4, \"character\": \"Captain Jack Spa...[{\"credit_id\": \"52fe4232c3a36847f800b579\", \"de...
2206647Spectre[spy, based on novel, secret agent, sequel, mi...[Action, Adventure, Crime]A cryptic message from Bond’s past sends him o...[{\"cast_id\": 1, \"character\": \"James Bond\", \"cr...[{\"credit_id\": \"54805967c3a36829b5002c41\", \"de...
349026The Dark Knight Rises[dc comics, crime fighter, terrorist, secret i...[Action, Crime, Drama, Thriller]Following the death of District Attorney Harve...[{\"cast_id\": 2, \"character\": \"Bruce Wayne / Ba...[{\"credit_id\": \"52fe4781c3a36847f81398c3\", \"de...
449529John Carter[based on novel, mars, medallion, space travel...[Action, Adventure, Science Fiction]John Carter is a war-weary, former military ca...[{\"cast_id\": 5, \"character\": \"John Carter\", \"c...[{\"credit_id\": \"52fe479ac3a36847f813eaa3\", \"de...
\n", - "
" - ], - "text/plain": [ - " movie_id title \\\n", - "0 19995 Avatar \n", - "1 285 Pirates of the Caribbean: At World's End \n", - "2 206647 Spectre \n", - "3 49026 The Dark Knight Rises \n", - "4 49529 John Carter \n", - "\n", - " keywords \\\n", - "0 [culture clash, future, space war, space colon... \n", - "1 [ocean, drug abuse, exotic island, east india ... \n", - "2 [spy, based on novel, secret agent, sequel, mi... \n", - "3 [dc comics, crime fighter, terrorist, secret i... \n", - "4 [based on novel, mars, medallion, space travel... \n", - "\n", - " genres \\\n", - "0 [Action, Adventure, Fantasy, Science Fiction] \n", - "1 [Adventure, Fantasy, Action] \n", - "2 [Action, Adventure, Crime] \n", - "3 [Action, Crime, Drama, Thriller] \n", - "4 [Action, Adventure, Science Fiction] \n", - "\n", - " overview \\\n", - "0 In the 22nd century, a paraplegic Marine is di... \n", - "1 Captain Barbossa, long believed to be dead, ha... \n", - "2 A cryptic message from Bond’s past sends him o... \n", - "3 Following the death of District Attorney Harve... \n", - "4 John Carter is a war-weary, former military ca... \n", - "\n", - " cast \\\n", - "0 [{\"cast_id\": 242, \"character\": \"Jake Sully\", \"... \n", - "1 [{\"cast_id\": 4, \"character\": \"Captain Jack Spa... \n", - "2 [{\"cast_id\": 1, \"character\": \"James Bond\", \"cr... \n", - "3 [{\"cast_id\": 2, \"character\": \"Bruce Wayne / Ba... \n", - "4 [{\"cast_id\": 5, \"character\": \"John Carter\", \"c... \n", - "\n", - " crew \n", - "0 [{\"credit_id\": \"52fe48009251416c750aca23\", \"de... \n", - "1 [{\"credit_id\": \"52fe4232c3a36847f800b579\", \"de... \n", - "2 [{\"credit_id\": \"54805967c3a36829b5002c41\", \"de... \n", - "3 [{\"credit_id\": \"52fe4781c3a36847f81398c3\", \"de... \n", - "4 [{\"credit_id\": \"52fe479ac3a36847f813eaa3\", \"de... " - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies['keywords'] = movies['keywords'].apply(arrange)\n", - "movies.head()" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "id": "c2dd0c3a", - "metadata": {}, - "outputs": [], - "source": [ - " #Here We Only collect the top 3 cast from the given cast \n", - "def convert(obj):\n", - " L = []\n", - " counter = 0\n", - " for i in ast.literal_eval(obj):\n", - " if counter !=3:\n", - " L.append(i['name'])\n", - " counter+=1\n", - " else:\n", - " break\n", - " return L" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "id": "ba9f3dd3", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
movie_idtitlekeywordsgenresoverviewcastcrew
019995Avatar[culture clash, future, space war, space colon...[Action, Adventure, Fantasy, Science Fiction]In the 22nd century, a paraplegic Marine is di...[Sam Worthington, Zoe Saldana, Sigourney Weaver][{\"credit_id\": \"52fe48009251416c750aca23\", \"de...
1285Pirates of the Caribbean: At World's End[ocean, drug abuse, exotic island, east india ...[Adventure, Fantasy, Action]Captain Barbossa, long believed to be dead, ha...[Johnny Depp, Orlando Bloom, Keira Knightley][{\"credit_id\": \"52fe4232c3a36847f800b579\", \"de...
2206647Spectre[spy, based on novel, secret agent, sequel, mi...[Action, Adventure, Crime]A cryptic message from Bond’s past sends him o...[Daniel Craig, Christoph Waltz, Léa Seydoux][{\"credit_id\": \"54805967c3a36829b5002c41\", \"de...
349026The Dark Knight Rises[dc comics, crime fighter, terrorist, secret i...[Action, Crime, Drama, Thriller]Following the death of District Attorney Harve...[Christian Bale, Michael Caine, Gary Oldman][{\"credit_id\": \"52fe4781c3a36847f81398c3\", \"de...
449529John Carter[based on novel, mars, medallion, space travel...[Action, Adventure, Science Fiction]John Carter is a war-weary, former military ca...[Taylor Kitsch, Lynn Collins, Samantha Morton][{\"credit_id\": \"52fe479ac3a36847f813eaa3\", \"de...
\n", - "
" - ], - "text/plain": [ - " movie_id title \\\n", - "0 19995 Avatar \n", - "1 285 Pirates of the Caribbean: At World's End \n", - "2 206647 Spectre \n", - "3 49026 The Dark Knight Rises \n", - "4 49529 John Carter \n", - "\n", - " keywords \\\n", - "0 [culture clash, future, space war, space colon... \n", - "1 [ocean, drug abuse, exotic island, east india ... \n", - "2 [spy, based on novel, secret agent, sequel, mi... \n", - "3 [dc comics, crime fighter, terrorist, secret i... \n", - "4 [based on novel, mars, medallion, space travel... \n", - "\n", - " genres \\\n", - "0 [Action, Adventure, Fantasy, Science Fiction] \n", - "1 [Adventure, Fantasy, Action] \n", - "2 [Action, Adventure, Crime] \n", - "3 [Action, Crime, Drama, Thriller] \n", - "4 [Action, Adventure, Science Fiction] \n", - "\n", - " overview \\\n", - "0 In the 22nd century, a paraplegic Marine is di... \n", - "1 Captain Barbossa, long believed to be dead, ha... \n", - "2 A cryptic message from Bond’s past sends him o... \n", - "3 Following the death of District Attorney Harve... \n", - "4 John Carter is a war-weary, former military ca... \n", - "\n", - " cast \\\n", - "0 [Sam Worthington, Zoe Saldana, Sigourney Weaver] \n", - "1 [Johnny Depp, Orlando Bloom, Keira Knightley] \n", - "2 [Daniel Craig, Christoph Waltz, Léa Seydoux] \n", - "3 [Christian Bale, Michael Caine, Gary Oldman] \n", - "4 [Taylor Kitsch, Lynn Collins, Samantha Morton] \n", - "\n", - " crew \n", - "0 [{\"credit_id\": \"52fe48009251416c750aca23\", \"de... \n", - "1 [{\"credit_id\": \"52fe4232c3a36847f800b579\", \"de... \n", - "2 [{\"credit_id\": \"54805967c3a36829b5002c41\", \"de... \n", - "3 [{\"credit_id\": \"52fe4781c3a36847f81398c3\", \"de... \n", - "4 [{\"credit_id\": \"52fe479ac3a36847f813eaa3\", \"de... " - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies['cast'] = movies['cast'].apply(convert)\n", - "movies.head()" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "bd763a09", - "metadata": {}, - "outputs": [], - "source": [ - " #Here We Only Want The Director From The Crew\n", - " \n", - "def find_director(obj):\n", - " L = []\n", - " counter = 0\n", - " for i in ast.literal_eval(obj):\n", - " if i['job'] == 'Director':\n", - " L.append(i['name'])\n", - " break\n", - " return L " - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "id": "397da8f0", - "metadata": {}, - "outputs": [], - "source": [ - "movies['crew'] = movies['crew'].apply(find_director)" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "id": "648e5696", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
movie_idtitlekeywordsgenresoverviewcastcrew
019995Avatar[culture clash, future, space war, space colon...[Action, Adventure, Fantasy, Science Fiction]In the 22nd century, a paraplegic Marine is di...[Sam Worthington, Zoe Saldana, Sigourney Weaver][James Cameron]
\n", - "
" - ], - "text/plain": [ - " movie_id title keywords \\\n", - "0 19995 Avatar [culture clash, future, space war, space colon... \n", - "\n", - " genres \\\n", - "0 [Action, Adventure, Fantasy, Science Fiction] \n", - "\n", - " overview \\\n", - "0 In the 22nd century, a paraplegic Marine is di... \n", - "\n", - " cast crew \n", - "0 [Sam Worthington, Zoe Saldana, Sigourney Weaver] [James Cameron] " - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies.head(1)" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "id": "b2339a20", - "metadata": {}, - "outputs": [], - "source": [ - " # Here we typecast the String into List\n", - " \n", - "movies['overview'] = movies['overview'].apply(lambda x:x.split())" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "id": "7f39e892", - "metadata": {}, - "outputs": [], - "source": [ - "# Now We Transform The String Into a Single antity so that the recommender model won't we confused\n", - "movies['genres'] = movies['genres'].apply(lambda x:[i.replace(\" \",\"\")for i in x])\n", - "movies['keywords'] = movies['keywords'].apply(lambda x:[i.replace(\" \",\"\")for i in x])\n", - "movies['cast'] = movies['cast'].apply(lambda x:[i.replace(\" \",\"\")for i in x])\n", - "movies['crew'] = movies['crew'].apply(lambda x:[i.replace(\" \",\"\")for i in x])" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "id": "625cd2d9", - "metadata": {}, - "outputs": [], - "source": [ - "# Now we Add new Column 'tags' in the movies dataset by concatenate overview,genres,keywords,cast,crew.\n", - "movies['tags'] = movies['overview'] + movies['keywords'] + movies['genres'] + movies['cast'] + movies['crew']" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "id": "5a7b3177", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
movie_idtitlekeywordsgenresoverviewcastcrewtags
019995Avatar[cultureclash, future, spacewar, spacecolony, ...[Action, Adventure, Fantasy, ScienceFiction][In, the, 22nd, century,, a, paraplegic, Marin...[SamWorthington, ZoeSaldana, SigourneyWeaver][JamesCameron][In, the, 22nd, century,, a, paraplegic, Marin...
1285Pirates of the Caribbean: At World's End[ocean, drugabuse, exoticisland, eastindiatrad...[Adventure, Fantasy, Action][Captain, Barbossa,, long, believed, to, be, d...[JohnnyDepp, OrlandoBloom, KeiraKnightley][GoreVerbinski][Captain, Barbossa,, long, believed, to, be, d...
\n", - "
" - ], - "text/plain": [ - " movie_id title \\\n", - "0 19995 Avatar \n", - "1 285 Pirates of the Caribbean: At World's End \n", - "\n", - " keywords \\\n", - "0 [cultureclash, future, spacewar, spacecolony, ... \n", - "1 [ocean, drugabuse, exoticisland, eastindiatrad... \n", - "\n", - " genres \\\n", - "0 [Action, Adventure, Fantasy, ScienceFiction] \n", - "1 [Adventure, Fantasy, Action] \n", - "\n", - " overview \\\n", - "0 [In, the, 22nd, century,, a, paraplegic, Marin... \n", - "1 [Captain, Barbossa,, long, believed, to, be, d... \n", - "\n", - " cast crew \\\n", - "0 [SamWorthington, ZoeSaldana, SigourneyWeaver] [JamesCameron] \n", - "1 [JohnnyDepp, OrlandoBloom, KeiraKnightley] [GoreVerbinski] \n", - "\n", - " tags \n", - "0 [In, the, 22nd, century,, a, paraplegic, Marin... \n", - "1 [Captain, Barbossa,, long, believed, to, be, d... " - ] - }, - "execution_count": 29, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "movies.head(2)" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "id": "c1913934", - "metadata": {}, - "outputs": [], - "source": [ - "# Now create new Dataframe with movie_id,title and tags\n", - "new_df = movies[['movie_id','title','tags']]" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "id": "57d14b01", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Users\\RISHAB~1\\AppData\\Local\\Temp/ipykernel_9680/3089450492.py:1: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame.\n", - "Try using .loc[row_indexer,col_indexer] = value instead\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " new_df['tags'] = new_df['tags'].apply(lambda x:\" \".join(x))\n" - ] - } - ], - "source": [ - "new_df['tags'] = new_df['tags'].apply(lambda x:\" \".join(x))" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "id": "c5b51884", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Users\\RISHAB~1\\AppData\\Local\\Temp/ipykernel_9680/3214958533.py:1: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame.\n", - "Try using .loc[row_indexer,col_indexer] = value instead\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " new_df['tags'] = new_df['tags'].apply(lambda x:x.lower())\n" - ] - } - ], - "source": [ - "new_df['tags'] = new_df['tags'].apply(lambda x:x.lower())" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "id": "ccf973df", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'in the 22nd century, a paraplegic marine is dispatched to the moon pandora on a unique mission, but becomes torn between following orders and protecting an alien civilization. cultureclash future spacewar spacecolony society spacetravel futuristic romance space alien tribe alienplanet cgi marine soldier battle loveaffair antiwar powerrelations mindandsoul 3d action adventure fantasy sciencefiction samworthington zoesaldana sigourneyweaver jamescameron'" - ] - }, - "execution_count": 34, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "new_df['tags'][0]" - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "id": "a6d72091", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\"captain barbossa, long believed to be dead, has come back to life and is headed to the edge of the earth with will turner and elizabeth swann. but nothing is quite as it seems. ocean drugabuse exoticisland eastindiatradingcompany loveofone'slife traitor shipwreck strongwoman ship alliance calypso afterlife fighter pirate swashbuckler aftercreditsstinger adventure fantasy action johnnydepp orlandobloom keiraknightley goreverbinski\"" - ] - }, - "execution_count": 35, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "new_df['tags'][1]" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "id": "87c9f024", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
movie_idtitletags
019995Avatarin the 22nd century, a paraplegic marine is di...
1285Pirates of the Caribbean: At World's Endcaptain barbossa, long believed to be dead, ha...
2206647Spectrea cryptic message from bond’s past sends him o...
349026The Dark Knight Risesfollowing the death of district attorney harve...
449529John Carterjohn carter is a war-weary, former military ca...
\n", - "
" - ], - "text/plain": [ - " movie_id title \\\n", - "0 19995 Avatar \n", - "1 285 Pirates of the Caribbean: At World's End \n", - "2 206647 Spectre \n", - "3 49026 The Dark Knight Rises \n", - "4 49529 John Carter \n", - "\n", - " tags \n", - "0 in the 22nd century, a paraplegic marine is di... \n", - "1 captain barbossa, long believed to be dead, ha... \n", - "2 a cryptic message from bond’s past sends him o... \n", - "3 following the death of district attorney harve... \n", - "4 john carter is a war-weary, former military ca... " - ] - }, - "execution_count": 36, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "new_df.head()" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "id": "76105b9e", - "metadata": {}, - "outputs": [], - "source": [ - "import nltk" - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "id": "f0b9fe2a", - "metadata": {}, - "outputs": [], - "source": [ - "from nltk.stem.porter import PorterStemmer\n", - "ps = PorterStemmer()" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "id": "60d4f4ba", - "metadata": {}, - "outputs": [], - "source": [ - "def stem(text):\n", - " y = []\n", - " \n", - " for i in text.split():\n", - " y.append(ps.stem(i))\n", - " \n", - " return \" \".join(y)" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "id": "1265b126", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Users\\RISHAB~1\\AppData\\Local\\Temp/ipykernel_9680/3213734980.py:1: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame.\n", - "Try using .loc[row_indexer,col_indexer] = value instead\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " new_df['tags'] = new_df['tags'].apply(stem)\n" - ] - } - ], - "source": [ - "new_df['tags'] = new_df['tags'].apply(stem)" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "id": "07ebeabd", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'in the 22nd century, a parapleg marin is dispatch to the moon pandora on a uniqu mission, but becom torn between follow order and protect an alien civilization. cultureclash futur spacewar spacecoloni societi spacetravel futurist romanc space alien tribe alienplanet cgi marin soldier battl loveaffair antiwar powerrel mindandsoul 3d action adventur fantasi sciencefict samworthington zoesaldana sigourneyweav jamescameron'" - ] - }, - "execution_count": 41, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "new_df['tags'][0]" - ] - }, - { - "cell_type": "markdown", - "id": "9c79768a", - "metadata": {}, - "source": [ - "### Text Vectorization using Bag of Words" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "id": "64ab2bef", - "metadata": {}, - "outputs": [], - "source": [ - "from sklearn.feature_extraction.text import CountVectorizer\n", - "cv = CountVectorizer(max_features=5000,stop_words ='english')" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "id": "2d746c34", - "metadata": {}, - "outputs": [], - "source": [ - "cv.fit_transform(new_df['tags']).toarray()\n", - "vectors = cv.fit_transform(new_df['tags']).toarray()\n" - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "id": "d2b162ea", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['000',\n", - " '007',\n", - " '10',\n", - " '100',\n", - " '11',\n", - " '12',\n", - " '13',\n", - " '14',\n", - " '15',\n", - " '16',\n", - " '17',\n", - " '17th',\n", - " '18',\n", - " '18th',\n", - " '18thcenturi',\n", - " '19',\n", - " '1910',\n", - " '1920',\n", - " '1930',\n", - " '1940',\n", - " '1944',\n", - " '1950',\n", - " '1950s',\n", - " '1960',\n", - " '1960s',\n", - " '1970',\n", - " '1970s',\n", - " '1971',\n", - " '1974',\n", - " '1976',\n", - " '1980',\n", - " '1985',\n", - " '1990',\n", - " '1999',\n", - " '19th',\n", - " '19thcenturi',\n", - " '20',\n", - " '200',\n", - " '2003',\n", - " '2009',\n", - " '20th',\n", - " '21st',\n", - " '23',\n", - " '24',\n", - " '25',\n", - " '30',\n", - " '300',\n", - " '3d',\n", - " '40',\n", - " '50',\n", - " '500',\n", - " '60',\n", - " '70',\n", - " '80',\n", - " 'aaron',\n", - " 'aaroneckhart',\n", - " 'abandon',\n", - " 'abduct',\n", - " 'abigailbreslin',\n", - " 'abil',\n", - " 'abl',\n", - " 'aboard',\n", - " 'abov',\n", - " 'abus',\n", - " 'academ',\n", - " 'academi',\n", - " 'accept',\n", - " 'access',\n", - " 'accid',\n", - " 'accident',\n", - " 'acclaim',\n", - " 'accompani',\n", - " 'accomplish',\n", - " 'account',\n", - " 'accus',\n", - " 'ace',\n", - " 'achiev',\n", - " 'acquaint',\n", - " 'act',\n", - " 'action',\n", - " 'actionhero',\n", - " 'activ',\n", - " 'activist',\n", - " 'activities',\n", - " 'actor',\n", - " 'actress',\n", - " 'actual',\n", - " 'ad',\n", - " 'adam',\n", - " 'adamsandl',\n", - " 'adamshankman',\n", - " 'adapt',\n", - " 'add',\n", - " 'addict',\n", - " 'adjust',\n", - " 'admir',\n", - " 'admit',\n", - " 'adolesc',\n", - " 'adopt',\n", - " 'ador',\n", - " 'adrienbrodi',\n", - " 'adult',\n", - " 'adultanim',\n", - " 'adulteri',\n", - " 'adulthood',\n", - " 'advanc',\n", - " 'adventur',\n", - " 'adventure',\n", - " 'adventures',\n", - " 'advertis',\n", - " 'advic',\n", - " 'advis',\n", - " 'affair',\n", - " 'affect',\n", - " 'afghanistan',\n", - " 'africa',\n", - " 'african',\n", - " 'africanamerican',\n", - " 'aftercreditssting',\n", - " 'afterlif',\n", - " 'aftermath',\n", - " 'ag',\n", - " 'age',\n", - " 'agediffer',\n", - " 'agenc',\n", - " 'agency',\n", - " 'agenda',\n", - " 'agent',\n", - " 'agents',\n", - " 'aggress',\n", - " 'ago',\n", - " 'agre',\n", - " 'ahead',\n", - " 'aid',\n", - " 'aidanquinn',\n", - " 'ail',\n", - " 'aim',\n", - " 'air',\n", - " 'airplan',\n", - " 'airplanecrash',\n", - " 'airport',\n", - " 'aka',\n", - " 'al',\n", - " 'alabama',\n", - " 'alan',\n", - " 'alaska',\n", - " 'albert',\n", - " 'alcatraz',\n", - " 'alcohol',\n", - " 'alecbaldwin',\n", - " 'alex',\n", - " 'alexkendrick',\n", - " 'alfredhitchcock',\n", - " 'alfredmolina',\n", - " 'ali',\n", - " 'alic',\n", - " 'alice',\n", - " 'alien',\n", - " 'alieninvas',\n", - " 'alienlife',\n", - " 'alienplanet',\n", - " 'aliens',\n", - " 'alik',\n", - " 'aliv',\n", - " 'alive',\n", - " 'allen',\n", - " 'alli',\n", - " 'allianc',\n", - " 'allow',\n", - " 'alon',\n", - " 'alongsid',\n", - " 'alpacino',\n", - " 'alpha',\n", - " 'alreadi',\n", - " 'alter',\n", - " 'altern',\n", - " 'alway',\n", - " 'alyssa',\n", - " 'alzheimer',\n", - " 'amanda',\n", - " 'amandapeet',\n", - " 'amandaseyfri',\n", - " 'amateur',\n", - " 'amaz',\n", - " 'amazon',\n", - " 'ambassador',\n", - " 'ambit',\n", - " 'ambiti',\n", - " 'ambul',\n", - " 'ambush',\n", - " 'america',\n", - " 'american',\n", - " 'americanabroad',\n", - " 'americancivilwar',\n", - " 'americanfootbal',\n", - " 'americanfootballplay',\n", - " 'amid',\n", - " 'amidst',\n", - " 'amnesia',\n", - " 'amp',\n", - " 'amsterdam',\n", - " 'amus',\n", - " 'amusementpark',\n", - " 'amy',\n", - " 'amyadam',\n", - " 'amysmart',\n", - " 'ana',\n", - " 'anakin',\n", - " 'analyst',\n", - " 'anarchiccomedi',\n", - " 'ancient',\n", - " 'ancientrom',\n", - " 'ancientworld',\n", - " 'anderson',\n", - " 'andi',\n", - " 'andiemacdowel',\n", - " 'andrew',\n", - " 'android',\n", - " 'andy',\n", - " 'andygarcía',\n", - " 'angel',\n", - " 'angela',\n", - " 'angelabassett',\n", - " 'angeles',\n", - " 'angelinajoli',\n", - " 'anger',\n", - " 'angle',\n", - " 'angri',\n", - " 'ani',\n", - " 'anim',\n", - " 'animalattack',\n", - " 'animalhorror',\n", - " 'animals',\n", - " 'anjelicahuston',\n", - " 'ann',\n", - " 'anna',\n", - " 'annafari',\n", - " 'annakendrick',\n", - " 'anne',\n", - " 'annehathaway',\n", - " 'annemoss',\n", - " 'annetteben',\n", - " 'anni',\n", - " 'annie',\n", - " 'anniversari',\n", - " 'announc',\n", - " 'annual',\n", - " 'anonym',\n", - " 'anoth',\n", - " 'answer',\n", - " 'ant',\n", - " 'antholog',\n", - " 'anthoni',\n", - " 'anthonyanderson',\n", - " 'anthonyhopkin',\n", - " 'anthropomorph',\n", - " 'anti',\n", - " 'antic',\n", - " 'antihero',\n", - " 'antiqu',\n", - " 'antoinefuqua',\n", - " 'antoniobandera',\n", - " 'antonyelchin',\n", - " 'anyon',\n", - " 'anyth',\n", - " 'apart',\n", - " 'apartheid',\n", - " 'apartment',\n", - " 'ape',\n", - " 'apocalyps',\n", - " 'apocalypse',\n", - " 'apocalypt',\n", - " 'appar',\n", - " 'appear',\n", - " 'appl',\n", - " 'apple',\n", - " 'appoint',\n", - " 'appreci',\n", - " 'apprentic',\n", - " 'approach',\n", - " 'april',\n", - " 'aquarium',\n", - " 'arab',\n", - " 'arch',\n", - " 'archaeologist',\n", - " 'archeolog',\n", - " 'archer',\n", - " 'architect',\n", - " 'arctic',\n", - " 'area',\n", - " 'aren',\n", - " 'arena',\n", - " 'argument',\n", - " 'aris',\n", - " 'aristocrat',\n", - " 'arm',\n", - " 'armi',\n", - " 'armor',\n", - " 'armsdeal',\n", - " 'army',\n", - " 'arnold',\n", - " 'arnoldschwarzenegg',\n", - " 'arrang',\n", - " 'arrangedmarriag',\n", - " 'arrest',\n", - " 'arriv',\n", - " 'arrog',\n", - " 'art',\n", - " 'arthur',\n", - " 'artifact',\n", - " 'artifici',\n", - " 'artificialintellig',\n", - " 'artist',\n", - " 'ash',\n", - " 'ashley',\n", - " 'ashleyjudd',\n", - " 'ashtonkutch',\n", - " 'asia',\n", - " 'asian',\n", - " 'asid',\n", - " 'ask',\n", - " 'aspect',\n", - " 'aspir',\n", - " 'assassin',\n", - " 'assault',\n", - " 'assembl',\n", - " 'assign',\n", - " 'assist',\n", - " 'assistant',\n", - " 'associ',\n", - " 'assum',\n", - " 'asteroid',\n", - " 'astronaut',\n", - " 'asylum',\n", - " 'atheist',\n", - " 'athlet',\n", - " 'atom',\n", - " 'atomicbomb',\n", - " 'attack',\n", - " 'attacks',\n", - " 'attempt',\n", - " 'attend',\n", - " 'attent',\n", - " 'attic',\n", - " 'attitud',\n", - " 'attorney',\n", - " 'attract',\n", - " 'auction',\n", - " 'audienc',\n", - " 'audit',\n", - " 'august',\n", - " 'aunt',\n", - " 'austin',\n", - " 'australia',\n", - " 'australian',\n", - " 'author',\n", - " 'autism',\n", - " 'auto',\n", - " 'automobilerac',\n", - " 'aveng',\n", - " 'averag',\n", - " 'avoid',\n", - " 'await',\n", - " 'awak',\n", - " 'awaken',\n", - " 'awar',\n", - " 'award',\n", - " 'away',\n", - " 'awkward',\n", - " 'awri',\n", - " 'awry',\n", - " 'ax',\n", - " 'babe',\n", - " 'babi',\n", - " 'baby',\n", - " 'bachelor',\n", - " 'backdrop',\n", - " 'background',\n", - " 'backpack',\n", - " 'bad',\n", - " 'bag',\n", - " 'bahama',\n", - " 'bail',\n", - " 'balanc',\n", - " 'ball',\n", - " 'ballet',\n", - " 'balloon',\n", - " 'baltimor',\n", - " 'ban',\n", - " 'band',\n", - " 'bandit',\n", - " 'bangkok',\n", - " 'banish',\n", - " 'bank',\n", - " 'banker',\n", - " 'bankrobb',\n", - " 'bankrobberi',\n", - " 'bar',\n", - " 'barbrastreisand',\n", - " 'bare',\n", - " 'bargain',\n", - " 'barn',\n", - " 'barney',\n", - " 'baron',\n", - " 'barri',\n", - " 'barrylevinson',\n", - " 'barrysonnenfeld',\n", - " 'bas',\n", - " 'base',\n", - " 'basebal',\n", - " 'basedoncomicbook',\n", - " 'basedongraphicnovel',\n", - " 'basedonnovel',\n", - " 'basedonplay',\n", - " 'basedonstagemus',\n", - " 'basedontrueev',\n", - " 'basedontruestori',\n", - " 'basedontvseri',\n", - " 'basedonvideogam',\n", - " 'basedonyoungadultnovel',\n", - " 'basement',\n", - " 'basketbal',\n", - " 'basketball',\n", - " 'bat',\n", - " 'batman',\n", - " 'battl',\n", - " 'battle',\n", - " 'battlefield',\n", - " 'bay',\n", - " 'beach',\n", - " 'beam',\n", - " 'bear',\n", - " 'beard',\n", - " 'beast',\n", - " 'beat',\n", - " 'beauti',\n", - " 'beautiful',\n", - " 'beautifulwoman',\n", - " 'beauty',\n", - " 'becam',\n", - " 'becaus',\n", - " 'becki',\n", - " 'becom',\n", - " 'becominganadult',\n", - " 'bed',\n", - " 'bedroom',\n", - " 'bee',\n", - " 'beer',\n", - " 'befor',\n", - " 'befriend',\n", - " 'began',\n", - " 'begin',\n", - " 'begins',\n", - " 'behavior',\n", - " 'belief',\n", - " 'believ',\n", - " 'bell',\n", - " 'bella',\n", - " 'belong',\n", - " 'belov',\n", - " 'ben',\n", - " 'benaffleck',\n", - " 'bend',\n", - " 'beneath',\n", - " 'benefit',\n", - " 'benfost',\n", - " 'beniciodeltoro',\n", - " 'benjamin',\n", - " 'benjaminbratt',\n", - " 'benkingsley',\n", - " 'bennett',\n", - " 'benstil',\n", - " 'bent',\n", - " 'berlin',\n", - " 'best',\n", - " 'bestfriend',\n", - " 'bestfriendsinlov',\n", - " 'bet',\n", - " 'beth',\n", - " 'betray',\n", - " 'bettemidl',\n", - " 'better',\n", - " 'betti',\n", - " 'beverli',\n", - " 'bibl',\n", - " 'bid',\n", - " 'big',\n", - " 'bigger',\n", - " 'biggest',\n", - " 'bike',\n", - " 'biker',\n", - " 'bikini',\n", - " 'billhad',\n", - " 'billi',\n", - " 'billionair',\n", - " 'billmurray',\n", - " 'billnighi',\n", - " 'billpaxton',\n", - " 'billpullman',\n", - " 'billybobthornton',\n", - " 'billycrudup',\n", - " 'billycryst',\n", - " 'biographi',\n", - " 'biolog',\n", - " 'bird',\n", - " 'birth',\n", - " 'birthday',\n", - " 'bisexu',\n", - " 'bishop',\n", - " 'bit',\n", - " 'bite',\n", - " 'bitter',\n", - " 'bizarr',\n", - " 'black',\n", - " 'blackmag',\n", - " 'blackmail',\n", - " 'blackpeopl',\n", - " 'blacksmith',\n", - " 'blade',\n", - " 'blame',\n", - " 'blend',\n", - " 'blind',\n", - " 'bliss',\n", - " 'blizzard',\n", - " 'block',\n", - " 'blond',\n", - " 'blood',\n", - " 'bloodi',\n", - " 'bloodsplatt',\n", - " 'bloodthirsti',\n", - " 'blow',\n", - " 'blue',\n", - " 'board',\n", - " 'boardingschool',\n", - " 'boat',\n", - " 'bob',\n", - " 'bobbi',\n", - " 'bobbyfarrelli',\n", - " 'bobhoskin',\n", - " 'bodi',\n", - " 'body',\n", - " 'bodyguard',\n", - " 'bold',\n", - " 'bollywood',\n", - " 'bomb',\n", - " 'bond',\n", - " 'bone',\n", - " 'book',\n", - " 'border',\n", - " 'bore',\n", - " 'boredom',\n", - " 'born',\n", - " 'boss',\n", - " 'boston',\n", - " 'botch',\n", - " 'bound',\n", - " 'boundari',\n", - " 'bounti',\n", - " 'bountyhunt',\n", - " 'bout',\n", - " 'box',\n", - " 'boxer',\n", - " 'boy',\n", - " 'boyfriend',\n", - " 'boys',\n", - " 'bradleycoop',\n", - " 'bradpitt',\n", - " 'brain',\n", - " 'brainwash',\n", - " 'brand',\n", - " 'brandon',\n", - " 'brave',\n", - " 'braveri',\n", - " 'brazil',\n", - " 'brazilian',\n", - " 'break',\n", - " 'breakdown',\n", - " 'breast',\n", - " 'breath',\n", - " 'breed',\n", - " 'brendanfras',\n", - " 'brendangleeson',\n", - " 'brent',\n", - " 'brettratn',\n", - " 'brian',\n", - " 'briandepalma',\n", - " 'bride',\n", - " 'bridesmaid',\n", - " 'bridg',\n", - " 'brief',\n", - " 'brielarson',\n", - " 'brien',\n", - " 'bright',\n", - " 'brilliant',\n", - " 'bring',\n", - " 'brink',\n", - " 'britain',\n", - " 'british',\n", - " 'britishsecretservic',\n", - " 'brittanymurphi',\n", - " 'broadcast',\n", - " 'broadway',\n", - " 'broke',\n", - " 'broken',\n", - " 'broker',\n", - " 'bronx',\n", - " 'brook',\n", - " 'brooklyn',\n", - " 'broom',\n", - " 'brothel',\n", - " 'brother',\n", - " 'brotherbrotherrelationship',\n", - " 'brothers',\n", - " 'brothersisterrelationship',\n", - " 'brought',\n", - " 'brown',\n", - " 'bruce',\n", - " 'brucegreenwood',\n", - " 'brucewilli',\n", - " 'brutal',\n", - " 'bryansing',\n", - " 'bu',\n", - " 'buck',\n", - " 'bud',\n", - " 'buddi',\n", - " 'buddy',\n", - " 'buddycomedi',\n", - " 'buddycop',\n", - " 'budget',\n", - " 'build',\n", - " 'building',\n", - " 'built',\n", - " 'bullet',\n", - " 'bulli',\n", - " 'bumbl',\n", - " 'bunch',\n", - " 'bunker',\n", - " 'bunni',\n", - " 'burglar',\n", - " 'buri',\n", - " 'burn',\n", - " 'bush',\n", - " 'busi',\n", - " 'business',\n", - " 'businessman',\n", - " 'bust',\n", - " 'butcher',\n", - " 'butler',\n", - " 'butt',\n", - " 'button',\n", - " 'buy',\n", - " 'buzz',\n", - " 'cabin',\n", - " 'caesar',\n", - " 'cage',\n", - " 'cairo',\n", - " 'cal',\n", - " 'california',\n", - " 'calvin',\n", - " 'camcord',\n", - " 'came',\n", - " 'camera',\n", - " 'cameraman',\n", - " 'camerondiaz',\n", - " 'camp',\n", - " 'campaign',\n", - " 'campbell',\n", - " 'campu',\n", - " 'canada',\n", - " 'canadian',\n", - " 'cancer',\n", - " 'candi',\n", - " 'candid',\n", - " 'canin',\n", - " 'cannib',\n", - " 'canuxploit',\n", - " 'capabl',\n", - " 'caper',\n", - " 'capit',\n", - " 'capt',\n", - " 'captain',\n", - " 'captiv',\n", - " 'captur',\n", - " 'capture',\n", - " 'car',\n", - " 'caraccid',\n", - " 'carchas',\n", - " 'carcrash',\n", - " 'card',\n", - " 'care',\n", - " 'career',\n", - " 'carefre',\n", - " 'caretak',\n", - " 'careymulligan',\n", - " 'caribbean',\n", - " 'carjourney',\n", - " 'carl',\n", - " 'carlagugino',\n", - " 'carmen',\n", - " 'carol',\n", - " 'carolina',\n", - " 'carrac',\n", - " 'carri',\n", - " 'carrie',\n", - " 'cartel',\n", - " 'carter',\n", - " 'cartoon',\n", - " 'caryelw',\n", - " 'case',\n", - " 'caseyaffleck',\n", - " 'cash',\n", - " 'casino',\n", - " 'cast',\n", - " 'castl',\n", - " 'cat',\n", - " 'cataclysm',\n", - " 'catastroph',\n", - " 'catch',\n", - " 'cateblanchett',\n", - " 'catherinedeneuv',\n", - " 'catherinekeen',\n", - " 'catherinezeta',\n", - " 'cathol',\n", - " 'catholic',\n", - " 'cattl',\n", - " 'caught',\n", - " 'caus',\n", - " 'cavalri',\n", - " 'cave',\n", - " 'cavemen',\n", - " 'celebr',\n", - " 'celebration',\n", - " 'cell',\n", - " 'cellphon',\n", - " 'cemeteri',\n", - " 'center',\n", - " 'centr',\n", - " 'central',\n", - " 'centuri',\n", - " 'centuries',\n", - " 'century',\n", - " 'ceo',\n", - " 'certain',\n", - " 'chad',\n", - " 'chain',\n", - " 'chainsaw',\n", - " 'challeng',\n", - " 'chamber',\n", - " 'champion',\n", - " 'championship',\n", - " 'chanc',\n", - " 'chance',\n", - " 'chang',\n", - " 'change',\n", - " 'changed',\n", - " 'changes',\n", - " 'channingtatum',\n", - " 'chao',\n", - " 'chaos',\n", - " 'chaotic',\n", - " 'chapter',\n", - " 'charact',\n", - " 'character',\n", - " 'characters',\n", - " 'charg',\n", - " 'charismat',\n", - " 'charl',\n", - " 'charli',\n", - " 'charlie',\n", - " 'charliesheen',\n", - " 'charlizetheron',\n", - " 'charm',\n", - " 'chart',\n", - " 'chase',\n", - " 'chauffeur',\n", - " 'chazzpalminteri',\n", - " 'cheat',\n", - " 'check',\n", - " 'cheerlead',\n", - " 'chef',\n", - " 'chemic',\n", - " 'cher',\n", - " 'chevychas',\n", - " 'chicago',\n", - " 'chicken',\n", - " 'chief',\n", - " 'child',\n", - " 'childabus',\n", - " 'childhero',\n", - " 'childhood',\n", - " 'childprodigi',\n", - " 'children',\n", - " 'chill',\n", - " 'chimp',\n", - " 'china',\n", - " 'chines',\n", - " 'chip',\n", - " 'chipmunk',\n", - " 'chiwetelejiofor',\n", - " 'chloe',\n", - " 'chloëgracemoretz',\n", - " 'chloësevigni',\n", - " 'chocol',\n", - " 'choic',\n", - " 'choice',\n", - " 'choos',\n", - " 'chosen',\n", - " 'chowyun',\n", - " 'chri',\n", - " 'chriscolumbu',\n", - " 'chriscoop',\n", - " 'chrisevan',\n", - " 'chrishemsworth',\n", - " 'chrisklein',\n", - " 'chrispin',\n", - " 'chrisrock',\n", - " 'christ',\n", - " 'christian',\n", - " 'christianbal',\n", - " 'christianslat',\n", - " 'christin',\n", - " 'christinaappleg',\n", - " 'christinaricci',\n", - " 'christma',\n", - " 'christmas',\n", - " 'christmasparti',\n", - " 'christmastre',\n", - " 'christoph',\n", - " 'christopherlambert',\n", - " 'christopherlloyd',\n", - " 'christophernolan',\n", - " 'christopherplumm',\n", - " 'christopherwalken',\n", - " 'christophwaltz',\n", - " 'chrisweitz',\n", - " 'chronicl',\n", - " 'chuck',\n", - " 'church',\n", - " 'cia',\n", - " 'ciaránhind',\n", - " 'cigarettesmok',\n", - " 'cillianmurphi',\n", - " 'cinema',\n", - " 'circl',\n", - " 'circu',\n", - " 'circuit',\n", - " 'circumst',\n", - " 'citi',\n", - " 'citizen',\n", - " 'city',\n", - " 'civil',\n", - " 'civilian',\n", - " 'civilwar',\n", - " 'claim',\n", - " 'clair',\n", - " 'clairedan',\n", - " 'claireforlani',\n", - " 'clan',\n", - " 'clark',\n", - " 'clash',\n", - " 'class',\n", - " 'classdiffer',\n", - " 'classic',\n", - " 'classmat',\n", - " 'classroom',\n", - " 'claudevandamm',\n", - " 'clay',\n", - " 'clean',\n", - " 'clear',\n", - " 'clerk',\n", - " 'clever',\n", - " 'client',\n", - " 'clients',\n", - " 'cliff',\n", - " 'climat',\n", - " 'climb',\n", - " 'clinteastwood',\n", - " 'cliveowen',\n", - " 'clock',\n", - " 'clone',\n", - " 'close',\n", - " 'closer',\n", - " 'cloud',\n", - " 'clown',\n", - " 'club',\n", - " 'clue',\n", - " 'clueless',\n", - " 'clutch',\n", - " 'coach',\n", - " 'coast',\n", - " 'cocain',\n", - " 'code',\n", - " 'coffin',\n", - " 'cohen',\n", - " 'col',\n", - " 'cold',\n", - " 'coldwar',\n", - " 'cole',\n", - " 'colin',\n", - " 'colinfarrel',\n", - " 'colinfirth',\n", - " 'collaps',\n", - " 'colleagu',\n", - " 'collect',\n", - " 'collector',\n", - " 'colleg',\n", - " 'college',\n", - " 'collid',\n", - " 'collis',\n", - " 'colombia',\n", - " 'colonel',\n", - " 'coloni',\n", - " 'color',\n", - " 'colorado',\n", - " 'coma',\n", - " 'combat',\n", - " 'combin',\n", - " 'come',\n", - " 'comeback',\n", - " 'comed',\n", - " 'comedi',\n", - " 'comedian',\n", - " 'comedy',\n", - " 'comet',\n", - " 'comfort',\n", - " 'comic',\n", - " 'coming',\n", - " 'comingofag',\n", - " 'comingout',\n", - " 'command',\n", - " 'commando',\n", - " 'commerci',\n", - " 'commiss',\n", - " 'commit',\n", - " 'common',\n", - " 'commun',\n", - " 'communist',\n", - " 'community',\n", - " 'compani',\n", - " 'companion',\n", - " 'company',\n", - " 'compet',\n", - " 'competit',\n", - " 'competition',\n", - " 'complet',\n", - " 'complex',\n", - " 'complic',\n", - " 'compos',\n", - " 'compuls',\n", - " 'comput',\n", - " 'computerviru',\n", - " 'conan',\n", - " 'concern',\n", - " 'concert',\n", - " 'concoct',\n", - " 'condit',\n", - " 'condition',\n", - " 'conduct',\n", - " 'confeder',\n", - " 'confess',\n", - " 'confid',\n", - " 'confin',\n", - " 'conflict',\n", - " 'confront',\n", - " 'confus',\n", - " 'congress',\n", - " 'conman',\n", - " 'connect',\n", - " 'connecticut',\n", - " 'connel',\n", - " 'connor',\n", - " 'conquer',\n", - " 'consequ',\n", - " 'consequences',\n", - " 'conserv',\n", - " 'consid',\n", - " 'conspir',\n", - " 'conspiraci',\n", - " 'conspiracy',\n", - " 'constant',\n", - " 'constantli',\n", - " 'construct',\n", - " 'consum',\n", - " 'contact',\n", - " 'contain',\n", - " 'contemporari',\n", - " 'contend',\n", - " 'content',\n", - " 'contest',\n", - " 'continu',\n", - " 'contract',\n", - " 'contractor',\n", - " 'control',\n", - " 'controversi',\n", - " 'convent',\n", - " 'converg',\n", - " 'convers',\n", - " 'convict',\n", - " 'convinc',\n", - " 'cook',\n", - " ...]" - ] - }, - "execution_count": 44, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "#len(cv.get_feature_names())\n", - "cv.get_feature_names()" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "id": "55c63a47", - "metadata": {}, - "outputs": [], - "source": [ - "from sklearn.metrics.pairwise import cosine_similarity" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "id": "23caad80", - "metadata": {}, - "outputs": [], - "source": [ - "similarity = cosine_similarity(vectors)" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "id": "9f86ba13", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[(1216, 0.28676966733820225),\n", - " (2409, 0.26901379342448517),\n", - " (3730, 0.2605130246476754),\n", - " (507, 0.255608593705383),\n", - " (539, 0.25038669783359574),\n", - " (582, 0.24511108480187255)]" - ] - }, - "execution_count": 47, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "sorted(list(enumerate(similarity[0])),reverse = True,key =lambda x:x[1])[1:7]" - ] - }, - { - "cell_type": "code", - "execution_count": 48, - "id": "81eea927", - "metadata": {}, - "outputs": [], - "source": [ - "def recommend(movie):\n", - " movie_index = new_df[new_df['title'] == movie].index[0]\n", - " distances = similarity[movie_index]\n", - " movies_list = sorted(list(enumerate(distances)),reverse = True,key =lambda x:x[1])[1:6]\n", - " \n", - " for i in movies_list:\n", - " print(new_df.iloc[i[0]].title)" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "5af5047f", - "metadata": {}, - "outputs": [ - { - "ename": "NameError", - "evalue": "name 'recommend' is not defined", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32mC:\\Users\\RISHAB~1\\AppData\\Local\\Temp/ipykernel_10388/3558917180.py\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mrecommend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'avtar'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[1;31mNameError\u001b[0m: name 'recommend' is not defined" - ] - } - ], - "source": [ - "recommend('avtar')" - ] - }, - { - "cell_type": "code", - "execution_count": 50, - "id": "4629bbe3", - "metadata": {}, - "outputs": [], - "source": [ - "# new_df.iloc[1216].title" - ] - }, - { - "cell_type": "code", - "execution_count": 51, - "id": "0c21e5a7", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'The Amazing Spider-Man'" - ] - }, - "execution_count": 51, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "new_df['title'][20]" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "534874f5", - "metadata": {}, - "outputs": [], - "source": [ - "# !pip install streamlit" - ] - }, - { - "cell_type": "code", - "execution_count": 54, - "id": "3b4a5464", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0 Avatar\n", - "1 Pirates of the Caribbean: At World's End\n", - "2 Spectre\n", - "3 The Dark Knight Rises\n", - "4 John Carter\n", - " ... \n", - "4804 El Mariachi\n", - "4805 Newlyweds\n", - "4806 Signed, Sealed, Delivered\n", - "4807 Shanghai Calling\n", - "4808 My Date with Drew\n", - "Name: title, Length: 4806, dtype: object" - ] - }, - "execution_count": 54, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "new_df['title']" - ] - }, - { - "cell_type": "code", - "execution_count": 55, - "id": "03294ff3", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{0: 'Avatar',\n", - " 1: \"Pirates of the Caribbean: At World's End\",\n", - " 2: 'Spectre',\n", - " 3: 'The Dark Knight Rises',\n", - " 4: 'John Carter',\n", - " 5: 'Spider-Man 3',\n", - " 6: 'Tangled',\n", - " 7: 'Avengers: Age of Ultron',\n", - " 8: 'Harry Potter and the Half-Blood Prince',\n", - " 9: 'Batman v Superman: Dawn of Justice',\n", - " 10: 'Superman Returns',\n", - " 11: 'Quantum of Solace',\n", - " 12: \"Pirates of the Caribbean: Dead Man's Chest\",\n", - " 13: 'The Lone Ranger',\n", - " 14: 'Man of Steel',\n", - " 15: 'The Chronicles of Narnia: Prince Caspian',\n", - " 16: 'The Avengers',\n", - " 17: 'Pirates of the Caribbean: On Stranger Tides',\n", - " 18: 'Men in Black 3',\n", - " 19: 'The Hobbit: The Battle of the Five Armies',\n", - " 20: 'The Amazing Spider-Man',\n", - " 21: 'Robin Hood',\n", - " 22: 'The Hobbit: The Desolation of Smaug',\n", - " 23: 'The Golden Compass',\n", - " 24: 'King Kong',\n", - " 25: 'Titanic',\n", - " 26: 'Captain America: Civil War',\n", - " 27: 'Battleship',\n", - " 28: 'Jurassic World',\n", - " 29: 'Skyfall',\n", - " 30: 'Spider-Man 2',\n", - " 31: 'Iron Man 3',\n", - " 32: 'Alice in Wonderland',\n", - " 33: 'X-Men: The Last Stand',\n", - " 34: 'Monsters University',\n", - " 35: 'Transformers: Revenge of the Fallen',\n", - " 36: 'Transformers: Age of Extinction',\n", - " 37: 'Oz: The Great and Powerful',\n", - " 38: 'The Amazing Spider-Man 2',\n", - " 39: 'TRON: Legacy',\n", - " 40: 'Cars 2',\n", - " 41: 'Green Lantern',\n", - " 42: 'Toy Story 3',\n", - " 43: 'Terminator Salvation',\n", - " 44: 'Furious 7',\n", - " 45: 'World War Z',\n", - " 46: 'X-Men: Days of Future Past',\n", - " 47: 'Star Trek Into Darkness',\n", - " 48: 'Jack the Giant Slayer',\n", - " 49: 'The Great Gatsby',\n", - " 50: 'Prince of Persia: The Sands of Time',\n", - " 51: 'Pacific Rim',\n", - " 52: 'Transformers: Dark of the Moon',\n", - " 53: 'Indiana Jones and the Kingdom of the Crystal Skull',\n", - " 54: 'The Good Dinosaur',\n", - " 55: 'Brave',\n", - " 56: 'Star Trek Beyond',\n", - " 57: 'WALL·E',\n", - " 58: 'Rush Hour 3',\n", - " 59: '2012',\n", - " 60: 'A Christmas Carol',\n", - " 61: 'Jupiter Ascending',\n", - " 62: 'The Legend of Tarzan',\n", - " 63: 'The Chronicles of Narnia: The Lion, the Witch and the Wardrobe',\n", - " 64: 'X-Men: Apocalypse',\n", - " 65: 'The Dark Knight',\n", - " 66: 'Up',\n", - " 67: 'Monsters vs Aliens',\n", - " 68: 'Iron Man',\n", - " 69: 'Hugo',\n", - " 70: 'Wild Wild West',\n", - " 71: 'The Mummy: Tomb of the Dragon Emperor',\n", - " 72: 'Suicide Squad',\n", - " 73: 'Evan Almighty',\n", - " 74: 'Edge of Tomorrow',\n", - " 75: 'Waterworld',\n", - " 76: 'G.I. Joe: The Rise of Cobra',\n", - " 77: 'Inside Out',\n", - " 78: 'The Jungle Book',\n", - " 79: 'Iron Man 2',\n", - " 80: 'Snow White and the Huntsman',\n", - " 81: 'Maleficent',\n", - " 82: 'Dawn of the Planet of the Apes',\n", - " 83: 'The Lovers',\n", - " 84: '47 Ronin',\n", - " 85: 'Captain America: The Winter Soldier',\n", - " 86: 'Shrek Forever After',\n", - " 87: 'Tomorrowland',\n", - " 88: 'Big Hero 6',\n", - " 89: 'Wreck-It Ralph',\n", - " 90: 'The Polar Express',\n", - " 91: 'Independence Day: Resurgence',\n", - " 92: 'How to Train Your Dragon',\n", - " 93: 'Terminator 3: Rise of the Machines',\n", - " 94: 'Guardians of the Galaxy',\n", - " 95: 'Interstellar',\n", - " 96: 'Inception',\n", - " 97: 'Shin Godzilla',\n", - " 98: 'The Hobbit: An Unexpected Journey',\n", - " 99: 'The Fast and the Furious',\n", - " 100: 'The Curious Case of Benjamin Button',\n", - " 101: 'X-Men: First Class',\n", - " 102: 'The Hunger Games: Mockingjay - Part 2',\n", - " 103: \"The Sorcerer's Apprentice\",\n", - " 104: 'Poseidon',\n", - " 105: 'Alice Through the Looking Glass',\n", - " 106: 'Shrek the Third',\n", - " 107: 'Warcraft',\n", - " 108: 'Terminator Genisys',\n", - " 109: 'The Chronicles of Narnia: The Voyage of the Dawn Treader',\n", - " 110: 'Pearl Harbor',\n", - " 111: 'Transformers',\n", - " 112: 'Alexander',\n", - " 113: 'Harry Potter and the Order of the Phoenix',\n", - " 114: 'Harry Potter and the Goblet of Fire',\n", - " 115: 'Hancock',\n", - " 116: 'I Am Legend',\n", - " 117: 'Charlie and the Chocolate Factory',\n", - " 118: 'Ratatouille',\n", - " 119: 'Batman Begins',\n", - " 120: 'Madagascar: Escape 2 Africa',\n", - " 121: 'Night at the Museum: Battle of the Smithsonian',\n", - " 122: 'X-Men Origins: Wolverine',\n", - " 123: 'The Matrix Revolutions',\n", - " 124: 'Frozen',\n", - " 125: 'The Matrix Reloaded',\n", - " 126: 'Thor: The Dark World',\n", - " 127: 'Mad Max: Fury Road',\n", - " 128: 'Angels & Demons',\n", - " 129: 'Thor',\n", - " 130: 'Bolt',\n", - " 131: 'G-Force',\n", - " 132: 'Wrath of the Titans',\n", - " 133: 'Dark Shadows',\n", - " 134: 'Mission: Impossible - Rogue Nation',\n", - " 135: 'The Wolfman',\n", - " 136: 'Bee Movie',\n", - " 137: 'Kung Fu Panda 2',\n", - " 138: 'The Last Airbender',\n", - " 139: 'Mission: Impossible III',\n", - " 140: 'White House Down',\n", - " 141: 'Mars Needs Moms',\n", - " 142: 'Flushed Away',\n", - " 143: 'Pan',\n", - " 144: 'Mr. Peabody & Sherman',\n", - " 145: 'Troy',\n", - " 146: \"Madagascar 3: Europe's Most Wanted\",\n", - " 147: 'Die Another Day',\n", - " 148: 'Ghostbusters',\n", - " 149: 'Armageddon',\n", - " 150: 'Men in Black II',\n", - " 151: 'Beowulf',\n", - " 152: 'Kung Fu Panda 3',\n", - " 153: 'Mission: Impossible - Ghost Protocol',\n", - " 154: 'Rise of the Guardians',\n", - " 155: 'Fun with Dick and Jane',\n", - " 156: 'The Last Samurai',\n", - " 157: 'Exodus: Gods and Kings',\n", - " 158: 'Star Trek',\n", - " 159: 'Spider-Man',\n", - " 160: 'How to Train Your Dragon 2',\n", - " 161: 'Gods of Egypt',\n", - " 162: 'Stealth',\n", - " 163: 'Watchmen',\n", - " 164: 'Lethal Weapon 4',\n", - " 165: 'Hulk',\n", - " 166: 'G.I. Joe: Retaliation',\n", - " 167: 'Sahara',\n", - " 168: 'Final Fantasy: The Spirits Within',\n", - " 169: 'Captain America: The First Avenger',\n", - " 170: 'The World Is Not Enough',\n", - " 171: 'Master and Commander: The Far Side of the World',\n", - " 172: 'The Twilight Saga: Breaking Dawn - Part 2',\n", - " 173: 'Happy Feet Two',\n", - " 174: 'The Incredible Hulk',\n", - " 175: 'The BFG',\n", - " 176: 'The Revenant',\n", - " 177: 'Turbo',\n", - " 178: 'Rango',\n", - " 179: 'Penguins of Madagascar',\n", - " 180: 'The Bourne Ultimatum',\n", - " 181: 'Kung Fu Panda',\n", - " 182: 'Ant-Man',\n", - " 183: 'The Hunger Games: Catching Fire',\n", - " 184: 'Home',\n", - " 185: 'War of the Worlds',\n", - " 186: 'Bad Boys II',\n", - " 187: 'Puss in Boots',\n", - " 188: 'Salt',\n", - " 189: 'Noah',\n", - " 190: 'The Adventures of Tintin',\n", - " 191: 'Harry Potter and the Prisoner of Azkaban',\n", - " 192: 'Australia',\n", - " 193: 'After Earth',\n", - " 194: 'Dinosaur',\n", - " 195: 'Night at the Museum: Secret of the Tomb',\n", - " 196: 'Megamind',\n", - " 197: \"Harry Potter and the Philosopher's Stone\",\n", - " 198: 'R.I.P.D.',\n", - " 199: 'Pirates of the Caribbean: The Curse of the Black Pearl',\n", - " 200: 'The Hunger Games: Mockingjay - Part 1',\n", - " 201: 'The Da Vinci Code',\n", - " 202: 'Rio 2',\n", - " 203: 'X2',\n", - " 204: 'Fast Five',\n", - " 205: 'Sherlock Holmes: A Game of Shadows',\n", - " 206: 'Clash of the Titans',\n", - " 207: 'Total Recall',\n", - " 208: 'The 13th Warrior',\n", - " 209: 'The Bourne Legacy',\n", - " 210: 'Batman & Robin',\n", - " 211: 'How the Grinch Stole Christmas',\n", - " 212: 'The Day After Tomorrow',\n", - " 213: 'Mission: Impossible II',\n", - " 214: 'The Perfect Storm',\n", - " 215: 'Fantastic 4: Rise of the Silver Surfer',\n", - " 216: 'Life of Pi',\n", - " 217: 'Ghost Rider',\n", - " 218: 'Jason Bourne',\n", - " 219: \"Charlie's Angels: Full Throttle\",\n", - " 220: 'Prometheus',\n", - " 221: 'Stuart Little 2',\n", - " 222: 'Elysium',\n", - " 223: 'The Chronicles of Riddick',\n", - " 224: 'RoboCop',\n", - " 225: 'Speed Racer',\n", - " 226: 'How Do You Know',\n", - " 227: 'Knight and Day',\n", - " 228: 'Oblivion',\n", - " 229: 'Star Wars: Episode III - Revenge of the Sith',\n", - " 230: 'Star Wars: Episode II - Attack of the Clones',\n", - " 231: 'Monsters, Inc.',\n", - " 232: 'The Wolverine',\n", - " 233: 'Star Wars: Episode I - The Phantom Menace',\n", - " 234: 'The Croods',\n", - " 235: 'Asterix at the Olympic Games',\n", - " 236: 'Windtalkers',\n", - " 237: \"The Huntsman: Winter's War\",\n", - " 238: 'Teenage Mutant Ninja Turtles',\n", - " 239: 'Gravity',\n", - " 240: \"Dante's Peak\",\n", - " 241: 'Teenage Mutant Ninja Turtles: Out of the Shadows',\n", - " 242: 'Fantastic Four',\n", - " 243: 'Night at the Museum',\n", - " 244: 'San Andreas',\n", - " 245: 'Tomorrow Never Dies',\n", - " 246: 'The Patriot',\n", - " 247: \"Ocean's Twelve\",\n", - " 248: 'Mr. & Mrs. Smith',\n", - " 249: 'Insurgent',\n", - " 250: 'The Aviator',\n", - " 251: \"Gulliver's Travels\",\n", - " 252: 'The Green Hornet',\n", - " 253: '300: Rise of an Empire',\n", - " 254: 'The Smurfs',\n", - " 255: 'Home on the Range',\n", - " 256: 'Allegiant',\n", - " 257: 'Real Steel',\n", - " 258: 'The Smurfs 2',\n", - " 259: 'Speed 2: Cruise Control',\n", - " 260: \"Ender's Game\",\n", - " 261: 'Live Free or Die Hard',\n", - " 262: 'The Lord of the Rings: The Fellowship of the Ring',\n", - " 263: 'Around the World in 80 Days',\n", - " 264: 'Ali',\n", - " 265: 'The Cat in the Hat',\n", - " 266: 'I, Robot',\n", - " 267: 'Kingdom of Heaven',\n", - " 268: 'Stuart Little',\n", - " 269: 'The Princess and the Frog',\n", - " 270: 'The Martian',\n", - " 271: 'The Island',\n", - " 272: 'Town & Country',\n", - " 273: 'Gone in Sixty Seconds',\n", - " 274: 'Gladiator',\n", - " 275: 'Minority Report',\n", - " 276: 'Harry Potter and the Chamber of Secrets',\n", - " 277: 'Casino Royale',\n", - " 278: 'Planet of the Apes',\n", - " 279: 'Terminator 2: Judgment Day',\n", - " 280: 'Public Enemies',\n", - " 281: 'American Gangster',\n", - " 282: 'True Lies',\n", - " 283: 'The Taking of Pelham 1 2 3',\n", - " 284: 'Little Fockers',\n", - " 285: 'The Other Guys',\n", - " 286: 'Eraser',\n", - " 287: 'Django Unchained',\n", - " 288: 'The Hunchback of Notre Dame',\n", - " 289: \"The Emperor's New Groove\",\n", - " 290: 'The Expendables 2',\n", - " 291: 'National Treasure',\n", - " 292: 'Eragon',\n", - " 293: 'Where the Wild Things Are',\n", - " 294: 'Epic',\n", - " 295: 'The Tourist',\n", - " 296: 'End of Days',\n", - " 297: 'Blood Diamond',\n", - " 298: 'The Wolf of Wall Street',\n", - " 299: 'Batman Forever',\n", - " 300: 'Starship Troopers',\n", - " 301: 'Cloud Atlas',\n", - " 302: \"Legend of the Guardians: The Owls of Ga'Hoole\",\n", - " 303: 'Catwoman',\n", - " 304: 'Hercules',\n", - " 305: 'Treasure Planet',\n", - " 306: 'Land of the Lost',\n", - " 307: 'The Expendables 3',\n", - " 308: 'Point Break',\n", - " 309: 'Son of the Mask',\n", - " 310: 'In the Heart of the Sea',\n", - " 311: 'The Adventures of Pluto Nash',\n", - " 312: 'Green Zone',\n", - " 313: 'The Peanuts Movie',\n", - " 314: 'The Spanish Prisoner',\n", - " 315: 'The Mummy Returns',\n", - " 316: 'Gangs of New York',\n", - " 317: 'The Flowers of War',\n", - " 318: \"Surf's Up\",\n", - " 319: 'The Stepford Wives',\n", - " 320: 'Black Hawk Down',\n", - " 321: 'The Campaign',\n", - " 322: 'The Fifth Element',\n", - " 323: 'Sex and the City 2',\n", - " 324: 'The Road to El Dorado',\n", - " 325: 'Ice Age: Continental Drift',\n", - " 326: 'Cinderella',\n", - " 327: 'The Lovely Bones',\n", - " 328: 'Finding Nemo',\n", - " 329: 'The Lord of the Rings: The Return of the King',\n", - " 330: 'The Lord of the Rings: The Two Towers',\n", - " 331: 'Seventh Son',\n", - " 332: 'Lara Croft: Tomb Raider',\n", - " 333: 'Transcendence',\n", - " 334: 'Jurassic Park III',\n", - " 335: 'Rise of the Planet of the Apes',\n", - " 336: 'The Spiderwick Chronicles',\n", - " 337: 'A Good Day to Die Hard',\n", - " 338: 'The Alamo',\n", - " 339: 'The Incredibles',\n", - " 340: 'Cutthroat Island',\n", - " 341: 'Percy Jackson & the Olympians: The Lightning Thief',\n", - " 342: 'Men in Black',\n", - " 343: 'Toy Story 2',\n", - " 344: 'Unstoppable',\n", - " 345: 'Rush Hour 2',\n", - " 346: 'What Lies Beneath',\n", - " 347: 'Cloudy with a Chance of Meatballs',\n", - " 348: 'Ice Age: Dawn of the Dinosaurs',\n", - " 349: 'The Secret Life of Walter Mitty',\n", - " 350: \"Charlie's Angels\",\n", - " 351: 'The Departed',\n", - " 352: 'Mulan',\n", - " 353: 'Tropic Thunder',\n", - " 354: 'The Girl with the Dragon Tattoo',\n", - " 355: 'Die Hard: With a Vengeance',\n", - " 356: 'Sherlock Holmes',\n", - " 357: 'Ben-Hur',\n", - " 358: 'Atlantis: The Lost Empire',\n", - " 359: 'Alvin and the Chipmunks: The Road Chip',\n", - " 360: 'Valkyrie',\n", - " 361: \"You Don't Mess with the Zohan\",\n", - " 362: 'Pixels',\n", - " 363: 'A.I. Artificial Intelligence',\n", - " 364: 'The Haunted Mansion',\n", - " 365: 'Contact',\n", - " 366: 'Hollow Man',\n", - " 367: 'The Interpreter',\n", - " 368: 'Percy Jackson: Sea of Monsters',\n", - " 369: 'Lara Croft Tomb Raider: The Cradle of Life',\n", - " 370: 'Now You See Me 2',\n", - " 371: 'The Saint',\n", - " 372: 'Spy Game',\n", - " 373: 'Mission to Mars',\n", - " 374: 'Rio',\n", - " 375: 'Bicentennial Man',\n", - " 376: 'Volcano',\n", - " 377: \"The Devil's Own\",\n", - " 378: 'K-19: The Widowmaker',\n", - " 379: 'Conan the Barbarian',\n", - " 380: 'Cinderella Man',\n", - " 381: 'The Nutcracker: The Untold Story',\n", - " 382: 'Seabiscuit',\n", - " 383: 'Twister',\n", - " 384: 'Cast Away',\n", - " 385: 'Happy Feet',\n", - " 386: 'The Bourne Supremacy',\n", - " 387: 'Air Force One',\n", - " 388: \"Ocean's Eleven\",\n", - " 389: 'The Three Musketeers',\n", - " 390: 'Hotel Transylvania',\n", - " 391: 'Enchanted',\n", - " 392: 'Safe House',\n", - " 393: '102 Dalmatians',\n", - " 394: 'Tower Heist',\n", - " 395: 'The Holiday',\n", - " 396: 'Enemy of the State',\n", - " 397: \"It's Complicated\",\n", - " 398: \"Ocean's Thirteen\",\n", - " 399: 'Open Season',\n", - " 400: 'Divergent',\n", - " 401: 'Enemy at the Gates',\n", - " 402: 'The Rundown',\n", - " 403: 'Last Action Hero',\n", - " 404: 'Memoirs of a Geisha',\n", - " 405: 'The Fast and the Furious: Tokyo Drift',\n", - " 406: 'Arthur Christmas',\n", - " 407: 'Meet Joe Black',\n", - " 408: 'Collateral Damage',\n", - " 409: 'All That Jazz',\n", - " 410: 'Mirror Mirror',\n", - " 411: 'Scott Pilgrim vs. the World',\n", - " 412: 'The Core',\n", - " 413: 'Nutty Professor II: The Klumps',\n", - " 414: 'Scooby-Doo',\n", - " 415: 'Dredd',\n", - " 416: 'Click',\n", - " 417: 'Creepshow',\n", - " 418: 'Cats & Dogs 2 : The Revenge of Kitty Galore',\n", - " 419: 'Jumper',\n", - " 420: 'Hellboy II: The Golden Army',\n", - " 421: 'Zodiac',\n", - " 422: 'The 6th Day',\n", - " 423: 'Bruce Almighty',\n", - " 424: 'The Expendables',\n", - " 425: 'Mission: Impossible',\n", - " 426: 'The Hunger Games',\n", - " 427: 'The Hangover Part II',\n", - " 428: 'Batman Returns',\n", - " 429: 'Over the Hedge',\n", - " 430: 'Lilo & Stitch',\n", - " 431: \"Charlotte's Web\",\n", - " 432: 'Deep Impact',\n", - " 433: 'RED 2',\n", - " 434: 'The Longest Yard',\n", - " 435: 'Alvin and the Chipmunks: Chipwrecked',\n", - " 436: 'Grown Ups 2',\n", - " 437: 'Get Smart',\n", - " 438: \"Something's Gotta Give\",\n", - " 439: 'Shutter Island',\n", - " 440: 'Four Christmases',\n", - " 441: 'Robots',\n", - " 442: 'Face/Off',\n", - " 443: 'Bedtime Stories',\n", - " 444: 'Road to Perdition',\n", - " 445: 'Just Go with It',\n", - " 446: 'Con Air',\n", - " 447: 'Eagle Eye',\n", - " 448: 'Cold Mountain',\n", - " 449: 'The Book of Eli',\n", - " 450: 'Flubber',\n", - " 451: 'The Haunting',\n", - " 452: 'Space Jam',\n", - " 453: 'The Pink Panther',\n", - " 454: 'The Day the Earth Stood Still',\n", - " 455: 'Conspiracy Theory',\n", - " 456: 'Fury',\n", - " 457: 'Six Days Seven Nights',\n", - " 458: 'Yogi Bear',\n", - " 459: 'Spirit: Stallion of the Cimarron',\n", - " 460: 'Zookeeper',\n", - " 461: 'Lost in Space',\n", - " 462: 'The Manchurian Candidate',\n", - " 463: 'Déjà Vu',\n", - " 464: 'Hotel Transylvania 2',\n", - " 465: 'Fantasia 2000',\n", - " 466: 'The Time Machine',\n", - " 467: 'Mighty Joe Young',\n", - " 468: 'Swordfish',\n", - " 469: 'The Legend of Zorro',\n", - " 470: 'What Dreams May Come',\n", - " 471: 'Little Nicky',\n", - " 472: 'The Brothers Grimm',\n", - " 473: 'Mars Attacks!',\n", - " 474: 'Evolution',\n", - " 475: 'The Edge',\n", - " 476: 'Surrogates',\n", - " 477: 'Thirteen Days',\n", - " 478: 'Daylight',\n", - " 479: 'Walking With Dinosaurs',\n", - " 480: 'Battlefield Earth',\n", - " 481: 'Looney Tunes: Back in Action',\n", - " 482: 'Nine',\n", - " 483: 'Timeline',\n", - " 484: 'The Postman',\n", - " 485: 'Babe: Pig in the City',\n", - " 486: 'The Last Witch Hunter',\n", - " 487: 'Red Planet',\n", - " 488: 'Arthur and the Invisibles',\n", - " 489: 'Oceans',\n", - " 490: 'A Sound of Thunder',\n", - " 491: 'Pompeii',\n", - " 492: 'Top Cat Begins',\n", - " 493: 'A Beautiful Mind',\n", - " 494: 'The Lion King',\n", - " 495: 'Journey 2: The Mysterious Island',\n", - " 496: 'Cloudy with a Chance of Meatballs 2',\n", - " 497: 'Red Dragon',\n", - " 498: 'Hidalgo',\n", - " 499: 'Jack and Jill',\n", - " 500: '2 Fast 2 Furious',\n", - " 501: 'The Little Prince',\n", - " 502: 'The Invasion',\n", - " 503: 'The Adventures of Rocky & Bullwinkle',\n", - " 504: 'The Secret Life of Pets',\n", - " 505: 'The League of Extraordinary Gentlemen',\n", - " 506: 'Despicable Me 2',\n", - " 507: 'Independence Day',\n", - " 508: 'The Lost World: Jurassic Park',\n", - " 509: 'Madagascar',\n", - " 510: 'Children of Men',\n", - " 511: 'X-Men',\n", - " 512: 'Wanted',\n", - " 513: 'The Rock',\n", - " 514: 'Ice Age: The Meltdown',\n", - " 515: '50 First Dates',\n", - " 516: 'Hairspray',\n", - " 517: 'Exorcist: The Beginning',\n", - " 518: 'Inspector Gadget',\n", - " 519: 'Now You See Me',\n", - " 520: 'Grown Ups',\n", - " 521: 'The Terminal',\n", - " 522: 'Hotel for Dogs',\n", - " 523: 'Vertical Limit',\n", - " 524: \"Charlie Wilson's War\",\n", - " 525: 'Shark Tale',\n", - " 526: 'Dreamgirls',\n", - " 527: 'Be Cool',\n", - " 528: 'Munich',\n", - " 529: 'Tears of the Sun',\n", - " 530: 'Killers',\n", - " 531: 'The Man from U.N.C.L.E.',\n", - " 532: 'Spanglish',\n", - " 533: 'Monster House',\n", - " 534: 'Bandits',\n", - " 535: 'First Knight',\n", - " 536: 'Anna and the King',\n", - " 537: 'Immortals',\n", - " 538: 'Hostage',\n", - " 539: 'Titan A.E.',\n", - " 540: 'Hollywood Homicide',\n", - " 541: 'Soldier',\n", - " 542: 'Carriers',\n", - " 543: 'Monkeybone',\n", - " 544: 'Flight of the Phoenix',\n", - " 545: 'Unbreakable',\n", - " 546: 'Minions',\n", - " 547: 'Sucker Punch',\n", - " 548: 'Snake Eyes',\n", - " 549: 'Sphere',\n", - " 550: 'The Angry Birds Movie',\n", - " 551: \"Fool's Gold\",\n", - " 552: 'Funny People',\n", - " 553: 'The Kingdom',\n", - " 554: 'Talladega Nights: The Ballad of Ricky Bobby',\n", - " 555: 'Dr. Dolittle 2',\n", - " 556: 'Braveheart',\n", - " 557: 'Jarhead',\n", - " 558: 'The Simpsons Movie',\n", - " 559: 'The Majestic',\n", - " 560: 'Driven',\n", - " 561: 'Two Brothers',\n", - " 562: 'The Village',\n", - " 563: 'Doctor Dolittle',\n", - " 564: 'Signs',\n", - " 565: 'Shrek 2',\n", - " 566: 'Cars',\n", - " 567: 'Runaway Bride',\n", - " 568: 'xXx',\n", - " 569: 'The SpongeBob Movie: Sponge Out of Water',\n", - " 570: 'Ransom',\n", - " 571: 'Inglourious Basterds',\n", - " 572: 'Hook',\n", - " 573: 'Die Hard 2',\n", - " 574: 'S.W.A.T.',\n", - " 575: 'Vanilla Sky',\n", - " 576: 'Lady in the Water',\n", - " 577: 'AVP: Alien vs. Predator',\n", - " 578: 'Alvin and the Chipmunks: The Squeakquel',\n", - " 579: 'We Were Soldiers',\n", - " 580: 'Olympus Has Fallen',\n", - " 581: 'Star Trek: Insurrection',\n", - " 582: 'Battle: Los Angeles',\n", - " 583: 'Big Fish',\n", - " 584: 'Wolf',\n", - " 585: 'War Horse',\n", - " 586: 'The Monuments Men',\n", - " 587: 'The Abyss',\n", - " 588: 'Wall Street: Money Never Sleeps',\n", - " 589: 'Dracula Untold',\n", - " 590: 'The Siege',\n", - " 591: 'Stardust',\n", - " 592: 'Seven Years in Tibet',\n", - " 593: 'The Dilemma',\n", - " 594: 'Bad Company',\n", - " 595: 'Doom',\n", - " 596: 'I Spy',\n", - " 597: 'Underworld: Awakening',\n", - " 598: 'Rock of Ages',\n", - " 599: \"Hart's War\",\n", - " 600: 'Killer Elite',\n", - " 601: 'Rollerball',\n", - " 602: 'Ballistic: Ecks vs. Sever',\n", - " 603: 'Hard Rain',\n", - " 604: 'Osmosis Jones',\n", - " 605: \"Legends of Oz: Dorothy's Return\",\n", - " 606: 'Blackhat',\n", - " 607: 'Sky Captain and the World of Tomorrow',\n", - " 608: 'Basic Instinct 2',\n", - " 609: 'Escape Plan',\n", - " 610: 'The Legend of Hercules',\n", - " 611: 'The Sum of All Fears',\n", - " 612: 'The Twilight Saga: Eclipse',\n", - " 613: 'The Score',\n", - " 614: 'Despicable Me',\n", - " 615: 'Money Train',\n", - " 616: 'Ted 2',\n", - " 617: 'Agora',\n", - " 618: 'Mystery Men',\n", - " 619: 'Hall Pass',\n", - " 620: 'The Insider',\n", - " 621: 'The Finest Hours',\n", - " 622: 'Body of Lies',\n", - " 623: 'Dinner for Schmucks',\n", - " 624: 'Abraham Lincoln: Vampire Hunter',\n", - " 625: 'Entrapment',\n", - " 626: 'The X Files',\n", - " 627: 'The Last Legion',\n", - " 628: 'Saving Private Ryan',\n", - " 629: 'Need for Speed',\n", - " 630: 'What Women Want',\n", - " 631: 'Ice Age',\n", - " 632: 'Dreamcatcher',\n", - " 633: 'Lincoln',\n", - " 634: 'The Matrix',\n", - " 635: 'Apollo 13',\n", - " 636: 'The Santa Clause 2',\n", - " 637: 'Les Misérables',\n", - " 638: \"You've Got Mail\",\n", - " 639: 'Step Brothers',\n", - " 640: 'The Mask of Zorro',\n", - " 641: 'Due Date',\n", - " 642: 'Unbroken',\n", - " 643: 'Space Cowboys',\n", - " 644: 'Cliffhanger',\n", - " 645: 'Broken Arrow',\n", - " 646: 'The Kid',\n", - " 647: 'World Trade Center',\n", - " 648: 'Mona Lisa Smile',\n", - " 649: 'The Dictator',\n", - " 650: 'Eyes Wide Shut',\n", - " 651: 'Annie',\n", - " 652: 'Focus',\n", - " 653: 'This Means War',\n", - " 654: 'Blade: Trinity',\n", - " 655: 'Red Dawn',\n", - " 656: 'Primary Colors',\n", - " 657: 'Resident Evil: Retribution',\n", - " 658: 'Death Race',\n", - " 659: 'The Long Kiss Goodnight',\n", - " 660: 'Proof of Life',\n", - " 661: 'Zathura: A Space Adventure',\n", - " 662: 'Fight Club',\n", - " 663: 'We Are Marshall',\n", - " 664: 'Hudson Hawk',\n", - " 665: 'Lucky Numbers',\n", - " 666: 'I, Frankenstein',\n", - " 667: 'Oliver Twist',\n", - " 668: 'Elektra',\n", - " 669: 'Sin City: A Dame to Kill For',\n", - " 670: 'Random Hearts',\n", - " 671: 'Everest',\n", - " 672: 'Perfume: The Story of a Murderer',\n", - " 673: 'Austin Powers in Goldmember',\n", - " 674: 'Astro Boy',\n", - " 675: 'Jurassic Park',\n", - " 676: 'Wyatt Earp',\n", - " 677: 'Clear and Present Danger',\n", - " 678: 'Dragon Blade',\n", - " 679: 'Little Man',\n", - " 680: 'U-571',\n", - " 681: 'The American President',\n", - " 682: 'The Love Guru',\n", - " 683: '3000 Miles to Graceland',\n", - " 684: 'The Hateful Eight',\n", - " 685: 'Blades of Glory',\n", - " 686: 'Hop',\n", - " 687: '300',\n", - " 688: 'Meet the Fockers',\n", - " 689: 'Marley & Me',\n", - " 690: 'The Green Mile',\n", - " 691: 'Wild Hogs',\n", - " 692: 'Chicken Little',\n", - " 693: 'Gone Girl',\n", - " 694: 'The Bourne Identity',\n", - " 695: 'GoldenEye',\n", - " 696: \"The General's Daughter\",\n", - " 697: 'The Truman Show',\n", - " 698: 'The Prince of Egypt',\n", - " 699: 'Daddy Day Care',\n", - " 700: '2 Guns',\n", - " 701: 'Cats & Dogs',\n", - " 702: 'The Italian Job',\n", - " 703: 'Two Weeks Notice',\n", - " 704: 'Antz',\n", - " 705: 'Couples Retreat',\n", - " 706: 'Days of Thunder',\n", - " 707: 'Cheaper by the Dozen 2',\n", - " 708: 'Maze Runner: The Scorch Trials',\n", - " 709: 'Eat Pray Love',\n", - " 710: 'The Family Man',\n", - " 711: 'RED',\n", - " 712: 'Any Given Sunday',\n", - " 713: 'The Horse Whisperer',\n", - " 714: 'Collateral',\n", - " 715: 'The Scorpion King',\n", - " 716: 'Ladder 49',\n", - " 717: 'Jack Reacher',\n", - " 718: 'Deep Blue Sea',\n", - " 719: 'This Is It',\n", - " 720: 'Contagion',\n", - " 721: 'Kangaroo Jack',\n", - " 722: 'Coraline',\n", - " 723: 'The Happening',\n", - " 724: 'Man on Fire',\n", - " 725: 'The Shaggy Dog',\n", - " 726: 'Starsky & Hutch',\n", - " 727: 'Jingle All the Way',\n", - " 728: 'Hellboy',\n", - " 729: 'A Civil Action',\n", - " 730: 'ParaNorman',\n", - " 731: 'The Jackal',\n", - " 732: 'Paycheck',\n", - " 733: 'Up Close & Personal',\n", - " 734: 'The Tale of Despereaux',\n", - " 735: 'The Tuxedo',\n", - " 736: 'Under Siege 2: Dark Territory',\n", - " 737: 'Jack Ryan: Shadow Recruit',\n", - " 738: 'Joy',\n", - " 739: 'London Has Fallen',\n", - " 740: 'Alien: Resurrection',\n", - " 741: 'Shooter',\n", - " 742: 'The Boxtrolls',\n", - " 743: 'Practical Magic',\n", - " 744: 'The Lego Movie',\n", - " 745: 'Miss Congeniality 2: Armed and Fabulous',\n", - " 746: 'Reign of Fire',\n", - " 747: 'Gangster Squad',\n", - " 748: 'Year One',\n", - " 749: 'Invictus',\n", - " 750: 'State of Play',\n", - " 751: 'Duplicity',\n", - " 752: 'My Favorite Martian',\n", - " 753: 'The Sentinel',\n", - " 754: 'Planet 51',\n", - " 755: 'Star Trek: Nemesis',\n", - " 756: 'Intolerable Cruelty',\n", - " 757: 'Trouble with the Curve',\n", - " 758: 'Edge of Darkness',\n", - " 759: 'The Relic',\n", - " 760: 'Analyze That',\n", - " 761: 'Righteous Kill',\n", - " 762: 'Mercury Rising',\n", - " 763: 'The Soloist',\n", - " 764: 'The Legend of Bagger Vance',\n", - " 765: 'Almost Famous',\n", - " 766: 'Garfield: A Tail of Two Kitties',\n", - " 767: 'xXx: State of the Union',\n", - " 768: 'Priest',\n", - " 769: 'Sinbad: Legend of the Seven Seas',\n", - " 770: 'Event Horizon',\n", - " 771: 'Dragonfly',\n", - " 772: 'The Black Dahlia',\n", - " 773: 'Flyboys',\n", - " 774: 'The Last Castle',\n", - " 775: 'Supernova',\n", - " 776: \"Winter's Tale\",\n", - " 777: 'The Mortal Instruments: City of Bones',\n", - " 778: 'Meet Dave',\n", - " 779: 'Dark Water',\n", - " 780: 'Edtv',\n", - " 781: 'Inkheart',\n", - " 782: 'The Spirit',\n", - " 783: 'Mortdecai',\n", - " 784: 'In the Name of the King: A Dungeon Siege Tale',\n", - " 785: 'Beyond Borders',\n", - " 786: 'The Monkey King 2',\n", - " 787: 'The Great Raid',\n", - " 788: 'Deadpool',\n", - " 789: 'Holy Man',\n", - " 790: 'American Sniper',\n", - " 791: 'Goosebumps',\n", - " 792: 'Just Like Heaven',\n", - " 793: 'The Flintstones in Viva Rock Vegas',\n", - " 794: 'Rambo III',\n", - " 795: 'Leatherheads',\n", - " 796: 'The Ridiculous 6',\n", - " 797: 'Did You Hear About the Morgans?',\n", - " 798: 'The Internship',\n", - " 799: 'Resident Evil: Afterlife',\n", - " 800: 'Red Tails',\n", - " 801: \"The Devil's Advocate\",\n", - " 802: \"That's My Boy\",\n", - " 803: 'DragonHeart',\n", - " 804: 'After the Sunset',\n", - " 805: 'Ghost Rider: Spirit of Vengeance',\n", - " 806: \"Captain Corelli's Mandolin\",\n", - " 807: 'The Pacifier',\n", - " 808: 'Walking Tall',\n", - " 809: 'Forrest Gump',\n", - " 810: 'Alvin and the Chipmunks',\n", - " 811: 'Meet the Parents',\n", - " 812: 'Pocahontas',\n", - " 813: 'Superman',\n", - " 814: 'The Nutty Professor',\n", - " 815: 'Hitch',\n", - " 816: 'George of the Jungle',\n", - " 817: 'American Wedding',\n", - " 818: 'Captain Phillips',\n", - " 819: 'Date Night',\n", - " 820: 'Casper',\n", - " 821: 'The Equalizer',\n", - " 822: 'Maid in Manhattan',\n", - " 823: 'Crimson Tide',\n", - " 824: 'The Pursuit of Happyness',\n", - " 825: 'Flightplan',\n", - " 826: 'Disclosure',\n", - " 827: 'City of Angels',\n", - " 828: 'Kill Bill: Vol. 1',\n", - " 829: 'Bowfinger',\n", - " 830: 'Kill Bill: Vol. 2',\n", - " 831: 'Tango & Cash',\n", - " 832: 'Death Becomes Her',\n", - " 833: 'Shanghai Noon',\n", - " 834: 'Executive Decision',\n", - " 835: \"Mr. Popper's Penguins\",\n", - " 836: 'The Forbidden Kingdom',\n", - " 837: 'Free Birds',\n", - " 838: 'Alien³',\n", - " 839: 'Evita',\n", - " 840: 'Ronin',\n", - " 841: 'The Ghost and the Darkness',\n", - " 842: 'Paddington',\n", - " 843: 'The Watch',\n", - " 844: 'The Hunted',\n", - " 845: 'Instinct',\n", - " 846: 'Stuck on You',\n", - " 847: 'Semi-Pro',\n", - " 848: 'The Pirates! In an Adventure with Scientists!',\n", - " 849: 'Changeling',\n", - " 850: 'Chain Reaction',\n", - " 851: 'The Fan',\n", - " 852: 'The Phantom of the Opera',\n", - " 853: 'Elizabeth: The Golden Age',\n", - " 854: 'Æon Flux',\n", - " 855: 'Gods and Generals',\n", - " 856: 'Turbulence',\n", - " 857: 'Imagine That',\n", - " 858: 'Muppets Most Wanted',\n", - " 859: 'Thunderbirds',\n", - " 860: 'Burlesque',\n", - " 861: 'A Very Long Engagement',\n", - " 862: 'Lolita',\n", - " 863: 'D-Tox',\n", - " 864: 'Blade II',\n", - " 865: 'Seven Pounds',\n", - " 866: 'Bullet to the Head',\n", - " 867: 'The Godfather: Part III',\n", - " 868: 'Elizabethtown',\n", - " 869: 'You, Me and Dupree',\n", - " 870: 'Superman II',\n", - " 871: 'Gigli',\n", - " 872: \"All the King's Men\",\n", - " 873: 'Shaft',\n", - " 874: 'Anastasia',\n", - " 875: 'Moulin Rouge!',\n", - " 876: 'Domestic Disturbance',\n", - " 877: 'Black Mass',\n", - " 878: 'Flags of Our Fathers',\n", - " 879: 'Law Abiding Citizen',\n", - " 880: 'Grindhouse',\n", - " 881: 'Beloved',\n", - " 882: 'Lucky You',\n", - " 883: 'Catch Me If You Can',\n", - " 884: 'Zero Dark Thirty',\n", - " 885: 'The Break-Up',\n", - " 886: 'Mamma Mia!',\n", - " 887: \"Valentine's Day\",\n", - " 888: 'The Dukes of Hazzard',\n", - " 889: 'The Thin Red Line',\n", - " 890: 'The Change-Up',\n", - " 891: 'Man on the Moon',\n", - " 892: 'Casino',\n", - " 893: 'From Paris with Love',\n", - " 894: 'Bulletproof Monk',\n", - " 895: 'Me, Myself & Irene',\n", - " 896: 'Barnyard',\n", - " 897: 'Deck the Halls',\n", - " 898: 'The Twilight Saga: New Moon',\n", - " 899: 'Shrek',\n", - " 900: 'The Adjustment Bureau',\n", - " 901: 'Robin Hood: Prince of Thieves',\n", - " 902: 'Jerry Maguire',\n", - " 903: 'Ted',\n", - " 904: 'As Good as It Gets',\n", - " 905: 'Patch Adams',\n", - " 906: 'Anchorman 2: The Legend Continues',\n", - " 907: 'Mr. Deeds',\n", - " 908: 'Super 8',\n", - " 909: 'Erin Brockovich',\n", - " 910: 'How to Lose a Guy in 10 Days',\n", - " 911: '22 Jump Street',\n", - " 912: 'Interview with the Vampire',\n", - " 913: 'Yes Man',\n", - " 914: 'Central Intelligence',\n", - " 915: 'Stepmom',\n", - " 916: \"Daddy's Home\",\n", - " 917: 'Into the Woods',\n", - " 918: 'Inside Man',\n", - " 919: 'Payback',\n", - " 920: 'Congo',\n", - " 921: 'We Bought a Zoo',\n", - " 922: 'Knowing',\n", - " 923: 'Failure to Launch',\n", - " 924: 'The Ring Two',\n", - " 925: 'Crazy, Stupid, Love.',\n", - " 926: 'Garfield',\n", - " 927: 'Christmas with the Kranks',\n", - " 928: 'Moneyball',\n", - " 929: 'Outbreak',\n", - " 930: 'Non-Stop',\n", - " 931: 'Race to Witch Mountain',\n", - " 932: 'V for Vendetta',\n", - " 933: 'Shanghai Knights',\n", - " 934: 'Curious George',\n", - " 935: 'Herbie Fully Loaded',\n", - " 936: \"Don't Say a Word\",\n", - " 937: 'Hansel & Gretel: Witch Hunters',\n", - " 938: 'Unfaithful',\n", - " 939: 'I Am Number Four',\n", - " 940: 'Syriana',\n", - " 941: '13 Hours: The Secret Soldiers of Benghazi',\n", - " 942: 'The Book of Life',\n", - " 943: 'Firewall',\n", - " 944: 'Absolute Power',\n", - " 945: 'G.I. Jane',\n", - " 946: 'The Game',\n", - " 947: 'Silent Hill',\n", - " 948: 'The Replacements',\n", - " 949: 'American Reunion',\n", - " 950: 'The Negotiator',\n", - " 951: 'Into the Storm',\n", - " 952: 'Beverly Hills Cop III',\n", - " 953: 'Gremlins 2: The New Batch',\n", - " 954: 'The Judge',\n", - " 955: 'The Peacemaker',\n", - " 956: 'Resident Evil: Apocalypse',\n", - " 957: 'Bridget Jones: The Edge of Reason',\n", - " 958: 'Out of Time',\n", - " 959: 'On Deadly Ground',\n", - " 960: 'The Adventures of Sharkboy and Lavagirl',\n", - " 961: 'The Beach',\n", - " 962: 'Raising Helen',\n", - " 963: 'Ninja Assassin',\n", - " 964: 'For Love of the Game',\n", - " 965: 'Striptease',\n", - " 966: 'Marmaduke',\n", - " 967: 'Hereafter',\n", - " 968: 'Murder by Numbers',\n", - " 969: 'Assassins',\n", - " 970: 'Hannibal Rising',\n", - " 971: 'The Story of Us',\n", - " 972: 'The Host',\n", - " 973: 'The Host',\n", - " 974: 'The Host',\n", - " 975: 'The Host',\n", - " 976: 'Basic',\n", - " 977: 'Blood Work',\n", - " 978: 'The International',\n", - " 979: 'Escape from L.A.',\n", - " 980: 'The Iron Giant',\n", - " 981: 'The Life Aquatic with Steve Zissou',\n", - " 982: 'Free State of Jones',\n", - " 983: 'The Life of David Gale',\n", - " 984: 'Man of the House',\n", - " 985: 'Run All Night',\n", - " 986: 'Eastern Promises',\n", - " 987: 'Into the Blue',\n", - " 988: 'The Messenger: The Story of Joan of Arc',\n", - " 989: 'Your Highness',\n", - " 990: 'Dream House',\n", - " 991: 'Mad City',\n", - " 992: \"Baby's Day Out\",\n", - " 993: 'The Scarlet Letter',\n", - " 994: 'Fair Game',\n", - " 995: 'Domino',\n", - " 996: 'Jade',\n", - " 997: 'Gamer',\n", - " 998: 'Beautiful Creatures',\n", - " 999: 'Death to Smoochy',\n", - " ...}" - ] - }, - "execution_count": 55, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "new_df.['title']" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "922e1831", - "metadata": {}, - "outputs": [], - "source": [ - "import pickle" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "2d91edf2", - "metadata": {}, - "outputs": [], - "source": [ - "pickle.dump(new_df.to_dict(),open('movie_dict.pkl','wb'))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f98e1a6e", - "metadata": {}, - "outputs": [], - "source": [ - "pickle.dump(similarity,open('similarity.pkl','wb'))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f9f2290f", - "metadata": {}, - "outputs": [], - "source": [ - "new_df.to_dict()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "29607bc4", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3.9.6 ('env': venv)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.6" - }, - "vscode": { - "interpreter": { - "hash": "4ce263faf97c8c1fa661a9024f56c6c8c2d9d2f745b9dd5bc50029dac9e2b436" - } - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}