This repository contains code for training and evaluating our proposed distantly supervised pyramid network for Unified Sentiment Analysis.
We introduce Unified Sentiment Analysis, a novel framework integrating aspect detection, sentiment analysis, and rating prediction.
We also propose the Distantly Supervised Pyramid Network (DSPN), which hierarchically models sentiment using only rating labels, as an implementation of unified sentiment analysis. Experiments show DSPN matches benchmark performance while improving efficiency and interpretability.
📂 data/processed # Contains processed datasets
📂 preprocess/ # Notebook for preprocessing datasets
📜 DSPN.ipynb # Main notebook for DSPN experiments
📜 Packages.ipynb # Notebook for installing required libraries
📜 logo.png # LOGO of DSPN
📜 models.py # Code for model implementation
📜 preprocess.py # Preprocessing code for data input
📜 test_func.py # Functions for testing model performance
📜 trainer.py # Code for model training
📜 utils.py # Common code shared across files
📜 LICENSE # Project license information
📜 README.md # Project documentation
Please refer to the Packages.ipynb notebook.
In the main notebook (DSPN.ipynb), you can choose the dataset and multiple hyperparameters (such as epoch number, batch size) to experiment with. The model can also be adjusted for customization in models.py.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is maintained by Wenchang Li and John P. Lalor.