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/activateInstall Python dependencies into the active virtual environment:
(.venv) $ python -m pip install -r requirements.txtDownload English model for spaCy:
(.venv) $ python -m spacy download en_core_web_smDownload 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 xvzGet the sentiment of a movie review stored in the TEST_REVIEW variable:
(.venv) $ python sentiment_analyzer.py