Skip to content

a sample pytorch Implementation of ACL 2021 research paper "Learning Span-Level Interactions for Aspect Sentiment Triplet Extraction".

License

Notifications You must be signed in to change notification settings

wireless911/span-aste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  

About

a sample pytorch Implementation of ACL 2021 research paper "Learning Span-Level Interactions for Aspect Sentiment Triplet Extraction".

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages