Code for A span-sharing joint extraction framework for harvesting aspect sentiment triplets.(Knowledge-Based Systems'2022)
python 3.6.1
numpy==1.17.4
tensorboardX==1.6
scikit-learn==0.25.0
torch==1.4.0
transformers
spacy==3.0.1
tpqm
use pip command
pip install -r requirements.txt
Notes
You can download the bert-base-cased from here
The directory tree of SSJE:
├─bert
│ └─base-uncased
├─data
│ ├─14lap
│ ├─14res
│ ├─15res
│ └─16res
├─layer
├─log
├─model
├─templates
├─trainer
download the ASTE-Dataset-V2 dataset from here or you can just use the data set that we've already processed.
- Training and testing model effects on 2014 Restaurant
python train_triplet.py --dataset 14res --max_span_size 8