Giter Club home page Giter Club logo

dgst's Introduction

DGST

This code corresponding to the paper: DGST: a Dual-Generator Network for Text Style Transfer (EMNLP2020).

The main website is here https://xiao.ac/proj/dgst.

This code is based on

python 3.7
pytorch (version >= 1.4.0)
torchvision (version >= 0.4.1)
fasttext (version >= 0.8.4)
nltk
tqmd

Training

Please run Exp_DGST.py to train the model like:

> python3 Exp_DGST.py --dataset Yelp

Or

> python3 Exp_DGST.py --dataset Imdb

to train DEST model on Yelp or Imdb dataset.

You can use the parameter -pg to show the training progress, e.g.

> python3 Exp_DGST.py --dataset Yelp -pg

The trained model will be saved in ./model_save/ , and the outcomes will be in ./outputs/ .

Ablation Study

There are ablation study types named:

  1. full-model
  2. no-rec
  3. no-tran
  4. rec-no-noise
  5. tran-no-noise
  6. pre-noise

For details please see the paper.

To run the ablation study, just run the file Exp_ablation_study.py .

> python3 Exp_ablation_study.py

Then the file will let you choose a ablation type.

You can also use the parameter -pg if you want to show the training progress, e.g.

> python3 Exp_ablation_study.py -pg

Paper and Citation

This work has been published in EMNLP2020. Here is the paper. If you find MSP interesting, please consider citing:

  @inproceedings{li-etal-2020-dgst, title = "{DGST}: a Dual-Generator Network for Text Style Transfer", author = "Li, Xiao and Chen, Guanyi and Lin, Chenghua and Li, Ruizhe", booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)", month = nov, year = "2020", address = "Online", publisher = "Association for Computational Linguistics", url = "https://www.aclweb.org/anthology/2020.emnlp-main.578", }  

Acknowledgement

This work is supported by the award made by the UK Engineering and Physical SciencesResearch Council (Grant number: EP/P011829/1).

dgst's People

Contributors

lissomx avatar

Stargazers

 avatar 任思宇 avatar  avatar  avatar Wu Kaixin avatar Xutan Peng avatar Ruizhe Li avatar

Watchers

 avatar

dgst's Issues

Which BLEU value was used?

Hello. I notice that you have calculated both sentence_bleu and corpus_bleu in AutoEvaluationF.py. Can you please confirm which BLEU value was used in the paper?

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.