We train Stanford Sentiment Treebank - 2 (SST2) using BERT
We use the Stanford Sentiment Treebank - 2
-
Install python 3.7.4
-
Set up requirements.
pip install -r tests/requirements.txt
-
Verify set up
export PYTHONPATH=./src pytest
-
Preprocess data to split data into train , test and val sample files and save them to
processdata
directoryexport PYTHONPATH=src datadir=tmp python src/utils/sst2_split_utils.py --sentencefile $datadir/datasetSentences.txt --sentiment $datadir/sentiment_labels.txt --dictionary $datadir/dictionary.txt --split $datadir/datasetSplit.txt --outdir processdata