Giter Club home page Giter Club logo

complexitycontrolledmt's Introduction

Complexity Controlled MT

This repository contains implementation for

Sweta Agrawal and Marine Carpuat. "Controlling Text Complexity in Neural Machine Translation". EMNLP-IJCNLP 2019.

Usage Instructions

  1. Run bash setup.sh to obtain necessary software.
  2. You can request the Newsela dataset and the OPUS corpus from here and here respectively.
  3. Use PrepareDataFiles.ipynb to extract alignments and create dev/train/test split and put it under data/.
  4. For Training
Monolingual English Simplification 
> bash scripts/main.sh -d -i <iter>

Multitask model trained on English Simplification and out-of-domain bilingual data
> bash scripts/main.sh -d -b -i <iter>

Other options:
> bash scripts/main.sh -h
  1. Evaluation: You can evaluate on the complexity controlled MT task by using the c flag
> bash scripts/evaluate.sh -i <iter> -c

Other options:
> bash scripts/evaluate.sh -h

To evaluate the pipeline model, you need to supply the ids for the first and the second model and a name for the evaluation. So if 1 represents the translation model (ES-EN) and 2 represents the simplification model (EN-EN), you can use the following script to evaluate the pipeline translate-then-simplify.

> bash scripts/evaluate_pipeline.sh -i 1 -j 3 -k esen

Some of the scripts for this work were modified from here. Also, the scripts to calculate SARI score and ARI readability index were referred from here and here respectively.

Note: Please refer to the supplementary material of our paper (Table 10 and 11) for exact statistics of the dataset used for training.

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.