Implementation of paper Does syntax matter? A strong baseline for Aspect-based Sentiment Analysis with RoBERTa.

Overview

RoBERTaABSA

This repo contains the code for NAACL 2021 paper titled Does syntax matter? A strong baseline for Aspect-based Sentiment Analysis with RoBERTa.

For any questions about the implementation, feel free to create an issue or email me via [email protected].

Usage

  1. Fine-tuning the model on ABSA datasets using the code form finetune folder, which will save the fine-tuned models.
  2. Generate the induced trees using the code form Perturbed-Masking folder, which will output the input datasets for different models.
  3. Run the code in ASGCN, PWCN and RGAT.

Disclaimer

We made neccessary changes based on the original code. We believe all the changes are under the MIT License permission. And we opensource all the changes we have made.

Issues
  • 请问您在运行finetune.py时,model_name选择的是“roberta-en”还是“roberta-en-large”?

    请问您在运行finetune.py时,model_name选择的是“roberta-en”还是“roberta-en-large”?

    您好,请问您在运行finetune.py时,model_name选择的是“roberta-en”还是“roberta-en-large”,我用“roberta-en”复现出的结果不太令人满意,但是用“roberta-en-large”是报错的,我无法找出原因,期待您的回答。

    opened by fuyao98 6
  • Hyper parameters in finetune

    Hyper parameters in finetune

    Thanks for your great work. Notice that the hyperparameter settings in the source code and the paper are different in finetuning. Which setting can reproduce the results of the paper?

    parser.add_argument("--lr", type=float, default=2e-5
    
    #######hyper
    n_epochs = 40
    pool = "max"
    smooth_eps = 0.0
    dropout = 0.5
    #######hype
    

    Besides, how did you get your test set? Thanks for your help.

    opened by ToheartZhang 5
  • R-GAT  数据处理问题

    R-GAT 数据处理问题

    在使用 allennlp.predictors.predictor.Predictor 时出现以下报错信息:allennlp.common.checks.ConfigurationError: key "token_embedders" is required at location "model.text_field_embedder." 请问这个问题您遇到过吗? 或者有啥建议避坑么

    使用的是:biaffine-dependency-parser-ptb-2018.08.23.tar.gz,跑您代码中的 data_preprocess_semeval.py 也报同样的错误

    opened by BD-MF 5
  • Evaluate fine-tuned model

    Evaluate fine-tuned model

    Hey, I am trying to obtain SOTA results with RoBARTa. I have successfully fine-tuned the model using "Train/finetune.py", but the "infer or evaluate" file is missing for it. Can you please add how to evaluate the fine-tuned model with examples to obtain the results?

    opened by satpalsr 3
  • missing JSON files in dataset directory

    missing JSON files in dataset directory

    thanks a lot for this great paper and repository!

    the code try to load jsons from the datasets, but there are only train and test XML files. I used an online tool to convert it to JSON, and it seem to fine tune ok on them.

    opened by srulikbd 2
  • [Question]多观点抽出是否支持?

    [Question]多观点抽出是否支持?

    想问一下, 这篇paper是否支持<aspect, opinion, sentiment>同时抽出?另外, 中文是否支持?

    Best Regards!

    opened by LangDaoAI 2
  • Keyword arguments {'add_special_tokens': True} not recognized.

    Keyword arguments {'add_special_tokens': True} not recognized.

    执行 python generate_matrix.py --model_path bert --data_dir ../Dataset/ --dataset Tweets 得到报错 Keyword arguments {'add_special_tokens': True} not recognized. allennlp的版本:2.5.0

    opened by RingoTC 2
C.J. Hutto 3.3k Jan 12, 2022
C.J. Hutto 2.8k Feb 18, 2021
A paper list for aspect based sentiment analysis.

Aspect-Based-Sentiment-Analysis A paper list for aspect based sentiment analysis. Survey [IEEE-TAC-20]: Issues and Challenges of Aspect-based Sentimen

jiangqn 381 Jan 17, 2022
Twitter-Sentiment-Analysis - Twitter sentiment analysis for india's top online retailers(2019 to 2022)

Twitter-Sentiment-Analysis Twitter sentiment analysis for india's top online retailers(2019 to 2022) Project Overview : Sentiment Analysis helps us to

Balaji R 1 Jan 1, 2022
KLUE-baseline contains the baseline code for the Korean Language Understanding Evaluation (KLUE) benchmark.

KLUE Baseline Korean(한국어) KLUE-baseline contains the baseline code for the Korean Language Understanding Evaluation (KLUE) benchmark. See our paper fo

null 59 Jan 3, 2022
Chinese named entity recognization (bert/roberta/macbert/bert_wwm with Keras)

Chinese named entity recognization (bert/roberta/macbert/bert_wwm with Keras)

null 1 Dec 24, 2021
An example project using OpenPrompt under pytorch-lightning for prompt-based SST2 sentiment analysis model

pl_prompt_sst An example project using OpenPrompt under the framework of pytorch-lightning for a training prompt-based text classification model on SS

Zhiling Zhang 2 Nov 25, 2021
Python Implementation of ``Modeling the Influence of Verb Aspect on the Activation of Typical Event Locations with BERT'' (Findings of ACL: ACL 2021)

BERT-for-Surprisal Python Implementation of ``Modeling the Influence of Verb Aspect on the Activation of Typical Event Locations with BERT'' (Findings

null 6 Nov 5, 2021
Simple, Pythonic, text processing--Sentiment analysis, part-of-speech tagging, noun phrase extraction, translation, and more.

TextBlob: Simplified Text Processing Homepage: https://textblob.readthedocs.io/ TextBlob is a Python (2 and 3) library for processing textual data. It

Steven Loria 8k Jan 19, 2022
Summarization, translation, sentiment-analysis, text-generation and more at blazing speed using a T5 version implemented in ONNX.

Summarization, translation, Q&A, text generation and more at blazing speed using a T5 version implemented in ONNX. This package is still in alpha stag

Abel 191 Jan 5, 2022
Simple, Pythonic, text processing--Sentiment analysis, part-of-speech tagging, noun phrase extraction, translation, and more.

TextBlob: Simplified Text Processing Homepage: https://textblob.readthedocs.io/ TextBlob is a Python (2 and 3) library for processing textual data. It

Steven Loria 7.5k Feb 17, 2021
Summarization, translation, sentiment-analysis, text-generation and more at blazing speed using a T5 version implemented in ONNX.

Summarization, translation, Q&A, text generation and more at blazing speed using a T5 version implemented in ONNX. This package is still in alpha stag

Abel 137 Feb 1, 2021
pysentimiento: A Python toolkit for Sentiment Analysis and Social NLP tasks

A Python multilingual toolkit for Sentiment Analysis and Social NLP tasks

null 165 Jan 12, 2022
Perform sentiment analysis and keyword extraction on Craigslist listings

craiglist-helper synopsis Perform sentiment analysis and keyword extraction on Craigslist listings Background I love Craigslist. I've found most of my

Mark Musil 1 Nov 8, 2021
A combination of autoregressors and autoencoders using XLNet for sentiment analysis

A combination of autoregressors and autoencoders using XLNet for sentiment analysis Abstract In this paper sentiment analysis has been performed in or

James Zaridis 2 Nov 20, 2021
Sentiment Analysis Project using Count Vectorizer and TF-IDF Vectorizer

Sentiment Analysis Project This project contains two sentiment analysis programs for Hotel Reviews using a Hotel Reviews dataset from Datafiniti. The

Simran Farrukh 0 Jan 14, 2022
Training code for Korean multi-class sentiment analysis

KoSentimentAnalysis Bert implementation for the Korean multi-class sentiment analysis 왜 한국어 감정 다중분류 모델은 거의 없는 것일까?에서 시작된 프로젝트 Environment: Pytorch, Da

Donghoon Shin 2 Dec 19, 2021
Machine Learning Course Project, IMDB movie review sentiment analysis by lstm, cnn, and transformer

IMDB Sentiment Analysis This is the final project of Machine Learning Courses in Huazhong University of Science and Technology, School of Artificial I

Daniel 0 Dec 27, 2021
AEC_DeepModel - Deep learning based acoustic echo cancellation baseline code

AEC_DeepModel - Deep learning based acoustic echo cancellation baseline code

凌逆战 40 Dec 27, 2021