Git Product home page Git Product logo

lorenzoagnolucci / bert_for_absa Goto Github PK

View Code? Open in Web Editor NEW
27.0 1.0 8.0 8.86 MB

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.

Python 50.92% Jupyter Notebook 49.08%
bert absa pytorch colab-notebook transformers sentiment-analysis tabsa huggingface-transformers sentihood-dataset semeval-2014-dataset

bert_for_absa's Introduction

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

bert_for_absa's People

Contributors

lorenzoagnolucci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.