Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.54 KB

README.md

File metadata and controls

57 lines (39 loc) · 1.54 KB

Span-ASTE-Pytorch

Python 3.8 PyTorch 1.8.1 cuDNN 7.6.5

This repository is a pytorch version that implements Ali's ACL 2021 research paper Learning Span-Level Interactions for Aspect Sentiment Triplet Extraction .

image

Usage

  1. Download dataset from here SemEval-Triplet-data,

  2. 训练模型

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
  1. 模型评估
python evaluate.py \
  --test_path  data/15res \
  --bert_model bert-base-uncased  \
  --model_path checkpoint/model_best \
  --batch_size 1 \ 
  --max_seq_len 512