You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Use Sentiment Analysis With Python to Classify Reviews
2
-
This folder contains resources and materials for Real Python's Use Sentiment Analysis With Python to Classify Reviews tutorial.
3
2
4
-
`sentiment_analyzer.py` contains a fully built sentiment analyzer as used in the project section of the tutorial. To get the sentiment of a review of your choosing, replace the text in the `TEST_REVIEW` variable.
3
+
Resources and materials for Real Python's [Use Sentiment Analysis With Python to Classify Reviews](https://realpython.com/use-sentiment-analysis-python-classify-movie-reviews/) tutorial.
4
+
5
+
## Installation
6
+
7
+
Create and activate a new virtual environment:
8
+
9
+
```shell
10
+
$ python -m venv .venv
11
+
$ source .venv/bin/activate
12
+
```
13
+
14
+
Install Python dependencies into the active virtual environment:
Download and extract the [Large Movie Review Dataset](https://ai.stanford.edu/~amaas/data/sentiment/) compiled by [Andrew Maas](http://www.andrew-maas.net/):
27
+
28
+
```shell
29
+
$ curl -s https://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz | tar xvz
30
+
```
31
+
32
+
## Usage
33
+
34
+
Get the sentiment of a movie review stored in the `TEST_REVIEW` variable:
0 commit comments