Resources and materials for Real Python's Use Sentiment Analysis With Python to Classify Reviews tutorial.
Create and activate a new virtual environment:
$ python -m venv .venv
$ source .venv/bin/activate
Install Python dependencies into the active virtual environment:
(.venv) $ python -m pip install -r requirements.txt
Download English model for spaCy:
(.venv) $ python -m spacy download en_core_web_sm
Download and extract the Large Movie Review Dataset compiled by Andrew Maas:
$ curl -s https://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz | tar xvz
Get the sentiment of a movie review stored in the TEST_REVIEW
variable:
(.venv) $ python sentiment_analyzer.py