Code Monkey home page Code Monkey logo

mt_idioms's Introduction

mt_idioms

Code & data for "Can Transformer be Too Compositional? Analysing Idiom Processing in Neural Machine Translation", published at ACL 2022.

@inproceedings{dankers2022can,
  title={Can Transformer be Too Compositional? Analysing Idiom Processing in Neural Machine Translation},
  author={Dankers, Verna and Lucas, Christopher and Titov, Ivan},
  booktitle={Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  pages={3608--3626},
  year={2022}
}

Install

1 - Install libraries using requirements.txt.

2 - Download a Spacy model for English using python -m spacy download en_core_web_sm.

3 - Custom install of the transformers library: transformers==4.3.0, with modeling_marian.py replaced with the adapted version from this repository. To clone transformers and replace MarianMT with our adapted version, carry out the following instructions:

git clone https://github.com/huggingface/transformers.git
cd transformers
git checkout 800f385d7808262946987ce91c158186649ec954
cd ..
mv modeling_marian.py transformers/src/transformers/models/marian/modeling_marian.py
cd transformers
pip install -e .

Other non-standard libraries are provided in the requirements.txt file.

Experiments

For results from the paper's sections, visit the following folders, that have their own README.

  • Section 3: See the data folder.
  • Section 4: See the attention folder.
  • Section 5: See the hidden_representations folder.
  • Section 6: See the amnesic_probing folder.
  • Appendix B: See the data folder.
  • Appendix C: See the attention folder.
  • Appendix D: See the attention and hidden_representations folder.
  • Appendix E: See the hidden_representations folder.
  • Appendix F: See the amnesic_probing folder.
  • Appendix G: See the data folder.

mt_idioms's People

Contributors

vernadankers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

psankesh9 donhuvy

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.