This repository is a pytorch version that implements Ali's ACL 2021 research paper Learning Span-Level Interactions for Aspect Sentiment Triplet Extraction .
- The original repository of the paper is based on the allennlp implementation
- Thanks to Ali's dataset SemEval-Triplet-data that was open sourced, so that we can use it for research
-
Download dataset from here SemEval-Triplet-data,
-
训练模型
python train.py \
--bert_model bert-base-uncased \
--batch_size 1 \
--learning_rate 5e-5 \
--weight_decay 1e-2 \
--warmup_proportion 0.1 \
--train_path data/15res \
--dev_path data/15res \
--save_dir ./checkpoint \
--max_seq_len 512 \
--num_epochs 10 \
--logging_steps 30 \
--valid_steps 50
- 模型评估
python evaluate.py \
--test_path data/15res \
--bert_model bert-base-uncased \
--model_path checkpoint/model_best \
--batch_size 1 \
--max_seq_len 512