{ "cells": [ { "cell_type": "code", "execution_count": 14, "id": "1f43149f", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import string\n", "from collections import defaultdict\n", "from sklearn.model_selection import train_test_split\n", "from sklearn.metrics import accuracy_score" ] }, { "cell_type": "code", "execution_count": 2, "id": "cecb763a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Freshness | \n", "Review | \n", "
---|---|---|
0 | \n", "fresh | \n", "Manakamana doesn't answer any questions, yet ... | \n", "
1 | \n", "fresh | \n", "Wilfully offensive and powered by a chest-thu... | \n", "
2 | \n", "rotten | \n", "It would be difficult to imagine material mor... | \n", "
3 | \n", "rotten | \n", "Despite the gusto its star brings to the role... | \n", "
4 | \n", "rotten | \n", "If there was a good idea at the core of this ... | \n", "
... | \n", "... | \n", "... | \n", "
479995 | \n", "rotten | \n", "Zemeckis seems unable to admit that the motio... | \n", "
479996 | \n", "fresh | \n", "Movies like The Kids Are All Right -- beautif... | \n", "
479997 | \n", "rotten | \n", "Film-savvy audiences soon will catch onto Win... | \n", "
479998 | \n", "fresh | \n", "An odd yet enjoyable film. | \n", "
479999 | \n", "fresh | \n", "No other animation studio, even our beloved P... | \n", "
480000 rows × 2 columns
\n", "\n", " | Freshness | \n", "Review | \n", "
---|---|---|
0 | \n", "fresh | \n", "Manakamana doesn't answer any questions, yet ... | \n", "
1 | \n", "fresh | \n", "Wilfully offensive and powered by a chest-thu... | \n", "
2 | \n", "rotten | \n", "It would be difficult to imagine material mor... | \n", "
3 | \n", "rotten | \n", "Despite the gusto its star brings to the role... | \n", "
4 | \n", "rotten | \n", "If there was a good idea at the core of this ... | \n", "
\n", " | Freshness | \n", "Review | \n", "
---|---|---|
104419 | \n", "rotten | \n", "sofia coppolas lost in translation was such ... | \n", "
121937 | \n", "rotten | \n", "the raven however is very serious and the dis... | \n", "
280266 | \n", "fresh | \n", "the best horror films have always reflected t... | \n", "
228692 | \n", "fresh | \n", "a big fat value meal stuffed with profane rav... | \n", "
189229 | \n", "fresh | \n", "as a fragmentary middle piece of something it... | \n", "
... | \n", "... | \n", "... | \n", "
360468 | \n", "rotten | \n", "the problem with revolver is that it is ritch... | \n", "
352358 | \n", "rotten | \n", "long winded ponderous and without much in the... | \n", "
335105 | \n", "fresh | \n", "watching ra dickey become one of the biggest ... | \n", "
441188 | \n", "rotten | \n", "the film has no shape or narrative force it m... | \n", "
170980 | \n", "rotten | \n", "it winds up being less than the sum of its parts | \n", "
50958 rows × 2 columns
\n", "