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.

Comments
  • 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 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
  • 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
  • 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
  • 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
  • 关于Perturbed Masking

    关于Perturbed Masking

    您好,请问通过Perturbed Masking得到单词之间的影响矩阵M后,是怎么解码成依存树的? 论文3.1.2中写道“The tree decoding algorithm, such as Eisner and Chu–Liu/Edmonds’ algorithm , is then used to extract the dependency tree from the matrix M.” 我查资料得知,Chu–Liu/Edmond是一种求最大生成树的算法,所以影响矩阵M(加权有向图)的最大生成树就是我们需要的依存树吗? 不太了解依存树的相关知识,还请不吝赐教,十分感谢!

    opened by zlh-source 1
Owner
null
C.J. Hutto 3.8k Dec 30, 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 419 Dec 20, 2022
MRC approach for Aspect-based Sentiment Analysis (ABSA)

B-MRC MRC approach for Aspect-based Sentiment Analysis (ABSA) Paper: Bidirectional Machine Reading Comprehension for Aspect Sentiment Triplet Extracti

Phuc Phan 1 Apr 5, 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
Code for Findings of ACL 2022 Paper "Sentiment Word Aware Multimodal Refinement for Multimodal Sentiment Analysis with ASR Errors"

SWRM Code for Findings of ACL 2022 Paper "Sentiment Word Aware Multimodal Refinement for Multimodal Sentiment Analysis with ASR Errors" Clone Clone th

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

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

null 2 Jul 5, 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 74 Dec 13, 2022
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 5 Oct 21, 2022
A Flask Sentiment Analysis API, with visual implementation

The Sentiment Analysis Api was created using python flask module,it allows users to parse a text or sentence throught the (?text) arguement, then view the sentiment analysis of that sentence. It can be implementable into a web application.

Ifechukwudeni Oweh 10 Jul 17, 2022
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 7 Dec 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 8.4k Dec 26, 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 211 Dec 28, 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 297 Dec 29, 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 Mar 28, 2022