Giter VIP home page Giter VIP logo

sampreeth-sarma / t5-absa-summarization Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 4.29 MB

Experimental Code and Data for the paper "Exploring Conditional Text Generation for Aspect-Based Sentiment Analysis"

Shell 2.93% Python 97.07%
absa absa-pytorch absa-generation absa-summarization t5-absa aspect-based-sentiment-analysis conditional-text-generation t5 generative-absa generative-framework-for-absa

t5-absa-summarization's Introduction

T5-ABSA-Summarization

Experimental code and data of paper Exploring Conditional Text Generation for Aspect-Based Sentiment Analysis, PACLIC 2021

Environment

Python==3.6
numpy==1.19.5
torch==1.7.0
simpletransformers==0.61.4
transformers==4.18.0

This repository relies on the previous work TAS-BERT.

Repository Description

  • All the datasets with the respective folders are present in the data directory
    • We use a function (convert_to_text_gen.py) to convert the data format from and to the TAS format and the Conditional Text Generation or Abstract Summarization format.
  • Following the TAS-BERT implementation, we continue to have the evaluation for AD, TD, TAD directory to facilitate the evaluation for Target Detection, Aspect Detection, and Target-Aspect Joint Detection
  • We provide separate .sh files to run the model on each dataset.
    • ./14_run_ASD.sh, ./sh_run_ASD.sh
      • dataset directory name (semeval-2014), task to run (ASD | AD), auxiliary format of the target text (sentence | phrase), and any random number to append to the result directory to distinguish from previous runs (1, 2, ...)
    • ./15_run_ASD.sh, ./16_run_ASD.sh
      • dataset directory name (semeval-2014), task to run (ASD | AD), auxiliary format of the target text (sentence | phrase), any random number to append to the result directory to distinguish from previous runs (1, 2, ...), and give True to evaluate on the best model based on the dev set from all the epochs or False to evaluate on the last epoch model parameters
  • Once you run the model, results, predictions, and runs directories will be created where all your model results and predictions will be generated

Running Information

  • We have separate scripts to run the T5 and BART models. Based on the model-type you want to evaluate on, please change it in the .sh script files accordingly
  • Make sure to give the correct numbers for the available GPUs for CUDA_VISIBLE_DEVICES
  • If you use the T5 model, it gives an option to generate as many sentences as you want, and we generated the top 3 most probable sentences for each task. In the results, you can see separate numbers for each of those sentences.
  • For SemEval-2014 and SentiHood Datasets, you can train and test for ASD (Aspect Sentiment Joint Detection), and AD (Aspect Detection) tasks
  • For SemEval-2015 and SemEval-2016 Datasets, you can train and test for
    • ASD (Aspect Sentiment Joint Detection), AD (Aspect Detection) tasks
    • TSD (Target Sentiment Joint Detection), TD (Target Detection) tasks
    • TASD (Target Aspect Sentiment Joint Detection), TAD (Target Aspect Detection) tasks

Note: You can change other parameters in the train and test script files if needed

Citation

If you use this code or method in your work, please cite our paper:

    @inproceedings{chebolu-etal-2021-exploring,
    title = "Exploring Conditional Text Generation for Aspect-Based Sentiment Analysis",
    author = "Chebolu, Siva Uday Sampreeth  and
      Dernoncourt, Franck  and
      Lipka, Nedim  and
      Solorio, Thamar",
    booktitle = "Proceedings of the 35th Pacific Asia Conference on Language, Information and Computation",
    month = "11",
    year = "2021",
    address = "Shanghai, China",
    publisher = "Association for Computational Lingustics",
    url = "https://aclanthology.org/2021.paclic-1.13",
    pages = "119--129",
}

t5-absa-summarization's People

Contributors

sampreeth-sarma avatar

Stargazers

 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.