Coder Social home page Coder Social logo

mt-marathon-22-comet's Introduction

Command Line Interface

Installation

For editable installation:

pip install -e .

Depending on which languages you process, you will need to install the corresponding spacy models.

Creating Adversarial Examples

Input: One or more TSV files with 'source', 'good-translation' and 'reference' fields.

You can automatically create adversarial examples by running:

breakit-perturb -i your_file.tsv ... -l target_lang

Output: One TSV file per input file named 'your_file.perturbed.tsv' with 'source', 'good-translation', 'incorrect-translation', 'reference', 'phenomena' fields.

Currently implemented perturbations:

  • Negation deletion and double negation
  • Unit conversions (only for English)
  • Number changes
  • Named entity changes

Currently supported languages:

  • English
  • German
  • French
  • Spanish
  • Korean
  • Japanese
  • Chinese

Scoring Adversarial Examples

Input: One or more TSV files with 'source', 'good-translation', 'incorrect-translation', 'reference', 'phenomena' fields.

You can automatically score adversarial examples by running:

breakit-score -i your_file.tsv ...

Output: One TSV file per input file named 'your_file.scored.tsv' with 'source', 'good-translation', 'incorrect-translation', 'reference', 'phenomena' fields and a 'metric-good' and 'metric-bad' field for every metric that stores the sentence-level scores.

Currently supported metrics:

  • BLEU
  • ChrF
  • COMET (needs GPU access)
  • COMET-QE (needs GPU access)

Evaluating Metrics

Input: TSV file with 'source', 'good-translation', 'incorrect-translation', 'reference', 'phenomena' fields and metric scores in 'metric-good' and 'metric-bad' fields.

You can evaluate metrics by running:

breakit-eval -i your_file.tsv ...

Output: STDOUT overview of Kendall Tau scores per file, phenomenon and metric.

mt-marathon-22-comet's People

Contributors

chanberg avatar lguillou avatar nikitacs16 avatar

Watchers

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