A package for computing the three-dimensional sentiment scores and a Jupyter notebook for replicating the figures in the paper "From a Large Language Model to Three-Dimensional Sentiment".
The sentiment model code is in "sentiment3d" and an example that demonstrates the use of this model is in the notebook example.ipynb. To reproduce all the figures in our paper, have a look at sentiment3d_paper.ipynb. The 3d sentiment model should run on any machine with 4GB of RAM or more.
python -m pip install git+https://github.com/compasspathways/Sentiment3D
Install from source and run in a virtual env:
git clone [email protected]:compasspathways/Sentiment3D.git
cd Sentiment3D
python3 -m venv venv-s3d
source venv-s3d/bin/activate
pip install -e ."[explore,dev]"
pre-commit install
To run the notebooks:
python -m ipykernel install --name "venv-s3d" --user
After you start the notebook server, be sure to switch to the venv-s3d kernel.
Please check out the interactive demo on Hugging Face at https://huggingface.co/spaces/compasspathways/Sentiment3D
Please cite our paper titled "From a Large Language Model to Three-Dimensional Sentiment".