GithubHelp home page GithubHelp logo

dalm's Introduction

Cross-Domain Data Augmentation with Domain-Adaptive Language Modeling for Aspect-Based Sentiment Analysis

The code for our ACL2023 paper (https://aclanthology.org/2023.acl-long.81/)

Jianfei Yu, Qiankun Zhao, Rui Xia. "Cross-Domain Data Augmentation with Domain-Adaptive Language Modeling for Aspect-Based Sentiment Analysis"

Datasets

The training data comes from four domains: Restaurant(R) 、 Laptop(L) 、 Service(S) 、 Devices(D).

The in-domain corpus(used for training BERT-E) come from yelp and amazon reviews.

Click here to get BERT-E (BERT-Extented) , and the extraction code is by0i. (Please specify the directory where BERT is stored in modelconfig.py.)

Usage

1. Domain-Adaptive Pseudo Labeling

To assign pseudo labels to unlabeled data in the target domain, run below code:

bash pseudo_label.sh

2. Domain-Adaptive Language Modeling

Train a domain-adaptive language model, generate target-domain labeled data, and finally use the generated data for the main tasks. We use LSTM and GPT2 as decoder in language modeling respectively.

2.1 To train the GPT2-based DALM for data generation and evaluation, run below code:

bash GPT2.sh

2.2 To train the LSTM-based DALM for data generation and evaluation, run below code:

bash LSTM.sh

Acknowledgements

  • Some code in LSTM-based language modeling are based on the codes of DAGA, many thanks!

dalm's People

Contributors

sakura-kk72 avatar

Stargazers

 avatar  avatar  avatar ShaonanFeng avatar Songhua Yang avatar  avatar  avatar  avatar Nan Song avatar  avatar Jianfei Yu avatar Zengzhi Wang avatar

Watchers

Rui Xia avatar NUSTM Admin avatar

dalm's Issues

Questions about the quantity of generating data

Thanks for your outstanding Contribution, your data augmentation method is very novel! After carefully reading your papaer, there's one quesiton that would like to consult:

Is the quantity of unlabeled dats used for generation pseudo label always one-to-one ? Is it feasible that generating multiple pseudo data given one sample?

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.