├── .github └── workflows │ ├── lint.yml │ └── pr-arena-workflow.yml ├── .gitignore ├── README.md ├── contextual_mt ├── __init__.py ├── attn_reg_loss.py ├── attn_reg_task.py ├── attn_reg_transformer.py ├── contextual_dataset.py ├── contextual_sequence_generator.py ├── contextual_transformer.py ├── docmt_contrastive_eval.py ├── docmt_cxmi.py ├── docmt_translate.py ├── document_translation_task.py ├── highlighted_dataset.py └── utils.py ├── data ├── OpenSubtitles18 │ └── README.md └── scat │ ├── README.md │ ├── highlighted.test.context.en │ ├── highlighted.test.context.fr │ ├── highlighted.test.en │ ├── highlighted.test.fr │ ├── highlighted.train.context.en │ ├── highlighted.train.context.fr │ ├── highlighted.train.en │ ├── highlighted.train.fr │ ├── highlighted.valid.context.en │ ├── highlighted.valid.context.fr │ ├── highlighted.valid.en │ └── highlighted.valid.fr ├── notebooks └── measuring_context_usage.ipynb ├── scripts ├── data │ ├── clean_corpus.py │ ├── contrapro │ │ └── format_contrastive.py │ ├── iwslt2017 │ │ ├── prepare_corpus.py │ │ ├── preprocess.sh │ │ └── preprocess_pretrained.sh │ └── paracrawl │ │ └── preprocess.sh ├── score.py ├── spm_encode.py └── spm_train.py ├── setup.py └── tapes ├── cxmi_paper.tape ├── cxmi_paper.tconf └── submitters.tape /.github/workflows/lint.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/.github/workflows/lint.yml -------------------------------------------------------------------------------- /.github/workflows/pr-arena-workflow.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/.github/workflows/pr-arena-workflow.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/README.md -------------------------------------------------------------------------------- /contextual_mt/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/__init__.py -------------------------------------------------------------------------------- /contextual_mt/attn_reg_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/attn_reg_loss.py -------------------------------------------------------------------------------- /contextual_mt/attn_reg_task.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/attn_reg_task.py -------------------------------------------------------------------------------- /contextual_mt/attn_reg_transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/attn_reg_transformer.py -------------------------------------------------------------------------------- /contextual_mt/contextual_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/contextual_dataset.py -------------------------------------------------------------------------------- /contextual_mt/contextual_sequence_generator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/contextual_sequence_generator.py -------------------------------------------------------------------------------- /contextual_mt/contextual_transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/contextual_transformer.py -------------------------------------------------------------------------------- /contextual_mt/docmt_contrastive_eval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/docmt_contrastive_eval.py -------------------------------------------------------------------------------- /contextual_mt/docmt_cxmi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/docmt_cxmi.py -------------------------------------------------------------------------------- /contextual_mt/docmt_translate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/docmt_translate.py -------------------------------------------------------------------------------- /contextual_mt/document_translation_task.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/document_translation_task.py -------------------------------------------------------------------------------- /contextual_mt/highlighted_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/highlighted_dataset.py -------------------------------------------------------------------------------- /contextual_mt/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/contextual_mt/utils.py -------------------------------------------------------------------------------- /data/OpenSubtitles18/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/OpenSubtitles18/README.md -------------------------------------------------------------------------------- /data/scat/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/README.md -------------------------------------------------------------------------------- /data/scat/highlighted.test.context.en: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.test.context.en -------------------------------------------------------------------------------- /data/scat/highlighted.test.context.fr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.test.context.fr -------------------------------------------------------------------------------- /data/scat/highlighted.test.en: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.test.en -------------------------------------------------------------------------------- /data/scat/highlighted.test.fr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.test.fr -------------------------------------------------------------------------------- /data/scat/highlighted.train.context.en: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.train.context.en -------------------------------------------------------------------------------- /data/scat/highlighted.train.context.fr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.train.context.fr -------------------------------------------------------------------------------- /data/scat/highlighted.train.en: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.train.en -------------------------------------------------------------------------------- /data/scat/highlighted.train.fr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.train.fr -------------------------------------------------------------------------------- /data/scat/highlighted.valid.context.en: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.valid.context.en -------------------------------------------------------------------------------- /data/scat/highlighted.valid.context.fr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.valid.context.fr -------------------------------------------------------------------------------- /data/scat/highlighted.valid.en: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.valid.en -------------------------------------------------------------------------------- /data/scat/highlighted.valid.fr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/data/scat/highlighted.valid.fr -------------------------------------------------------------------------------- /notebooks/measuring_context_usage.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/notebooks/measuring_context_usage.ipynb -------------------------------------------------------------------------------- /scripts/data/clean_corpus.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/scripts/data/clean_corpus.py -------------------------------------------------------------------------------- /scripts/data/contrapro/format_contrastive.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/data/iwslt2017/prepare_corpus.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/scripts/data/iwslt2017/prepare_corpus.py -------------------------------------------------------------------------------- /scripts/data/iwslt2017/preprocess.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/scripts/data/iwslt2017/preprocess.sh -------------------------------------------------------------------------------- /scripts/data/iwslt2017/preprocess_pretrained.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/scripts/data/iwslt2017/preprocess_pretrained.sh -------------------------------------------------------------------------------- /scripts/data/paracrawl/preprocess.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/scripts/data/paracrawl/preprocess.sh -------------------------------------------------------------------------------- /scripts/score.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/scripts/score.py -------------------------------------------------------------------------------- /scripts/spm_encode.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/scripts/spm_encode.py -------------------------------------------------------------------------------- /scripts/spm_train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/scripts/spm_train.py -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/setup.py -------------------------------------------------------------------------------- /tapes/cxmi_paper.tape: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/tapes/cxmi_paper.tape -------------------------------------------------------------------------------- /tapes/cxmi_paper.tconf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/tapes/cxmi_paper.tconf -------------------------------------------------------------------------------- /tapes/submitters.tape: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neulab/contextual-mt/HEAD/tapes/submitters.tape --------------------------------------------------------------------------------