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


  1. ? Download dataset from here SemEval-Triplet-data,
    ASTE-Data-V2-EMNLP2020 is used in my repository
  2. ? Download GloVe pre-trained word vectors,
  3. ? Convert glove_input_file in GloVe format to word2vec format and write it to `word2vec_output_file

from gensim.scripts.glove2word2vec import glove2word2vec

glove2word2vec("path/to/dir/glove_input_file", "path/to/dir/word2vec_output_file")
  1. ? train the span-aste model

python --glove_word2vector vector_cache/w2v.txt \
          --dataset data/ASTE-Data-V2-EMNLP2020/15res/ \
          --output_path output/
  1. ? test the span-aste model

python --model_path  \
          --glove_word2vector corpus/w2v.txt \
          --dataset data/ASTE-Data-V2-EMNLP2020/15res/\
          -model `path/to/model/model.pkl`


View Github