GithubHelp home page GithubHelp logo

vania-mendonca / onception Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 972 KB

Active Learning with Expert Advice for Real World Machine Translation

Jupyter Notebook 59.52% Python 40.48%
nlp machine-translation active-learning

onception's Introduction

Onception

Active Learning with Expert Advice for Real World Machine Translation

Data

We use the test sets from the WMT'19 News Translation shared task and the WMT'20 News Translation shared task (the latter annotated with pSQM scores).

On the test sets from WMT'19, the files ad-seg-scores-src-mt.csv for each language pair src-mt (where src is the source language and mt is the translation language) are under different subfolders of "human evaluation data" (depending on the languages), and should be gathered under the same directory when running the Preprocessing-AnyLang notebook.

In the datasets/WMT19 folder, we provide the Comet scores for each pair of segment ID (sid) and competing system on WMT'19.

For WMT'20, the files psqm_newstest2020_ende.tsv and psqm_newstest2020_zhen.tsv provided here should be run over data_processing_20_2/DataProcessing_pSQM.ipynb, and the outputs copied to the datasets/WMT20_pSQM folder.

How to run

For embedding extraction:

  • Download the desired BERT model (we used English and Multilingual Base Cased on our experiments)
  • Install BERT as a service from hanxiao/bert-as-service and run its server on a Python >= 3.5 environment with Tensorflow >= 1.10
  • Run Data Processing_embeddings.ipynb *

For the remaining code:

  • Run pip install -r requirements.txt on a Python 3.x environment

To obtain Prism scores:

Experiments:

  • Baseline (without active learning): run mt_ol.ipynb *
  • Onception: run Onception.ipynb *
  • Individual active learning query strategies:
> mt_ol_al.py --qs=<query_strategy> --sm=<similarity_measure> --ts=<threshold> --alg=<online_algorithm> --rw=<reward_func> --task=<task> --src=<src_lang> --mt=<mt_lang> --run=<num_no>

*.ipynb files require Jupyter Notebook or similar

How to cite

If you use this code, please cite the following articles:

  • Onception/Active Learning: Mendonça, V., Rei, R., Coheur, L. Sardinha, A. (2023), Onception: Active Learning with Expert Advice for Real World Machine Translation, Computational Linguistics, 49(2):325–372. 10.1162/coli_a_00473

  • Baseline: Mendonça, V., Rei, R., Coheur, L., Sardinha, A., Santos, A. L. (2021). Online Learning Meets Machine Translation Evaluation: Finding the Best Systems with the Least Human Effort. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), 3105–3117. 10.18653/v1/2021.acl-long.242

onception's People

Contributors

vania-mendonca avatar

Watchers

James Cloos avatar  avatar Ricardo Rei avatar

Forkers

neerajvashistha

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.