Skip to content

In this work (Targeted) Aspect-Based Sentiment Analysis task is converted to a sentence-pair classification task and a pre-trained BERT model is fine-tuned on it.

Notifications You must be signed in to change notification settings

LorenzoAgnolucci/BERT_for_ABSA

Repository files navigation

BERT for ABSA

Table of Contents

About The Project

Replication of the methodology proposed in the paper Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence.

In this work (Targeted) Aspect-Based Sentiment Analysis task is converted to a sentence-pair classification task and a pre-trained BERT model is fine-tuned on it.

More details about the project in the presentation.

Built With

Installation

To get a local copy up and running follow these simple steps:

  1. Clone the repo
git clone https://github.com/LorenzoAgnolucci/BERT_for_ABSA.git
  1. Run pip install -r requirements.txt in the root folder of the repo to install the requirements

Usage

  1. Run generate_datasets.py to build the datasets corresponding to each model or simply use the ones provided in data/sentihood/ and data/semeval2014/

  2. Use the forms in BERT_for_ABSA.ipynb to choose the desired dataset type and task both for BERT-single and BERT-pair. Then fine-tune the model and evaluate it runnning the corresponding cells

  3. Run the subsequent cells in BERT_for_ABSA.ipynb to fine-tune and evalaute the model

Authors

Acknowledgments

Machine Learning © Course held by Professor Paolo Frasconi - Computer Engineering Master Degree @University of Florence

About

In this work (Targeted) Aspect-Based Sentiment Analysis task is converted to a sentence-pair classification task and a pre-trained BERT model is fine-tuned on it.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published