Code Monkey home page Code Monkey logo

formality_emnlp19's Introduction

Harnessing Pre-Trained Neural Networks with Rules for Formality Style Transfer

1. model outputs

The outputs of our methods is under the "gyafc_model_outputs" directory. The "em_out" means the result for "Entertainment&Music". The "fr_out" means the result for "Family&Relationships".

"formal.gpt.ori" is the result of "GPT-Orig"

"formal.gpt.rule" is the result of "GPT-Rule"

"formal.gpt.ori_rules.ens" is the result of "GPT-Ensemble"

"formal.gpt.cat_no_share.ori_rule" is the result of "GPT-CAT"

"formal.gpt.hie.ori_rule" is the result of "GPT-HA".

"formal.gpt.cat.domain_cmb.ori_rule" is the result of "GPT-CAT" trained on domain combined data.

2. evaluation scripts

We released our evaluation scripts for "Formality", "BLEU" and "PINC". Scripts for evluation are under the "evaluate" directory. Run "evaluate_em.py" or "evaluate_fr.py" can calculate the metrics for the model outputs("gyafc_model_output" should be under the "evaluate" directory).

We didn't release our code for "Meaning" because we just use BERT to fine-tune on STS.

References are not released directly because you should first get access to GYAFC dataset. See more in Section 3.1.

3. model scripts

The code of our method is under "./gpt", "./utils" and "./preprocess".

3.1 training data

The training data includes original GYAFC dataset and the outputs of a simple rule based system. To obtain our training data, you should first get the access to GYAFC dataset. Once you have gained the access to GYAFC dataset, please forward the acknowledgment to [email protected], then we will provide access to our training data and other materials for evaluation.

3.2 run

Please download this repo directly, then put "training_data" under './' and "gyafc_model_outputs" under './evaluate/'. Run "main.py"(under './gpt/') to perform our methods.

We suggest to use Pycharm to run this project.

formality_emnlp19's People

Contributors

jimth001 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.