BOTE - Bert for Opinion Triplet Extraction
- Code and preprocessed dataset for paper titled A Deep Learning approach for Aspect Sentiment Triplet Extraction in Portuguese (preparing for submission)
- Jose Melendez and Glauber de Bona.
- Python 3.7.10
- PyTorch 1.8.1+cu101
- Numpy 1.19.5
- Transformers 4.6.1
- Spacy 2.2.4
- Pandas 1.1.5
- Install Spacy Languages
python -m spacy download en_core_web_md
python -m spacy download pt_core_news_sm
python -m spacy download es_core_news_md
- Set enviroment
python generate_directory_data.py
python dependency_graph.py --undirected 1
python generate_data.py
- Download pretrained GloVe embeddings (Englisg and Portuguese) with these links: EN Glove and PT Glove . Extract files into
glove/
.
- Train with command, optional arguments could be found in train.py
python train.py --model bote --case cased --dataset reli_c_0 --bert_model neuralmind/bert-base-portuguese-cased --lang pt
- Run proposted model and baselines
chmod -R 777 run.sh
bash ./run.sh -d 'rehol' -E 60
python cross_validation/display_results.py
An overview of the task aspect sentiment triplet extraction (ASTE) is given below
Given a sentence
If you use the code in your paper, please cite our paper
@InProceedings{10.1007/978-3-030-91699-2_24,
author="Barros, Jos{\'e} Mel{\'e}ndez
and De Bona, Glauber",
editor="Britto, Andr{\'e}
and Valdivia Delgado, Karina",
title="A Deep Learning Approach for Aspect Sentiment Triplet Extraction in Portuguese",
booktitle="Intelligent Systems",
year="2021",
publisher="Springer International Publishing",
address="Cham",
pages="343--358",
isbn="978-3-030-91699-2"
}