This is part 2 of the DSC180 sequence. For the first part, please see the DSC180A repository. This quarter focuses on auditing toxicity models TextBlob, vaderSentiment, and Perspective API.
- Obtain an Perspective API Key: For all cases you will need a Perspective API key. You can find instructions on how to do so from the Perspective API Docs.
- Add config information: Fill out the Perspective API key into the
sample.secrets.json
and rename the file tosecrets.json
. For example usage, seenotebooks/model-exploration.ipynb
. - Setup your environment: Install packages
TextBlob
,vaderSentiment
, andGoogle API Client
. These are in addition to the the standard packages provided by Jupyter.
pip install textblob vaderSentiment google-api-python-client
python -m textblob.download_corpora
- Run tests: Run one of the notebooks under
notebooks/
. It is recommended to run one of themodel-audit-<NAME>.ipynb
notebooks as they are the most up-to-date.