Interactive Neural Machine Translation tool
Перейти к файлу
Jahanvi Shah 134946df22
Modify API Documentation (#27)
2021-03-08 14:33:46 +05:30
.ipynb_checkpoints Included the Machine Translation Code in the repository 2019-07-23 13:34:53 +05:30
InteractiveTranslation Add REST APIs for translation queries 2020-07-10 10:19:49 +05:30
analysis Merged PR 7: User Study Analysis 2020-01-13 11:10:14 +00:00
docs Modify API Documentation (#27) 2021-03-08 14:33:46 +05:30
gpt Add Simple Interfacefeatures to Keystroke Interface 2019-08-08 11:32:07 +05:30
mt Add Tamil translation models 2020-07-21 09:39:58 +05:30
mtpara Add Simple Interfacefeatures to Keystroke Interface 2019-08-08 11:32:07 +05:30
mtsimple Added parameters for partial and full sentences suggestions (#25) 2021-03-08 14:31:27 +05:30
opennmt Added parameters for partial and full sentences suggestions (#25) 2021-03-08 14:31:27 +05:30
static Added parameters for partial and full sentences suggestions (#25) 2021-03-08 14:31:27 +05:30
templates PgUp/PgDn functionality 2021-02-09 11:25:56 +05:30
.azure-demo Included the Machine Translation Code in the repository 2019-07-23 13:34:53 +05:30
.gitignore Add config.json 2020-08-20 14:31:50 +05:30
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2020-02-26 00:18:42 -08:00
Dockerfile Fix opennmt naming changes 2020-04-09 04:15:18 +05:30
LICENSE Initial LICENSE commit 2020-02-26 00:18:43 -08:00
README.md Update README.md 2020-11-19 02:48:10 +05:30
SECURITY.md Initial SECURITY.md commit 2020-02-26 00:18:45 -08:00
azure-pipelines.yml Update azure-pipelines.yml for running credscan on windows image. 2020-03-06 15:18:47 +05:30
config.json Add configuration file for target BPE codes 2020-09-25 20:36:08 +05:30
docker-compose.yml Configure Docker 2020-02-27 21:39:21 +05:30
env-example Included the Machine Translation Code in the repository 2019-07-23 13:34:53 +05:30
graph.png Included the Machine Translation Code in the repository 2019-07-23 13:34:53 +05:30
manage.py Included the Machine Translation Code in the repository 2019-07-23 13:34:53 +05:30
opennmt.zip Included the Machine Translation Code in the repository 2019-07-23 13:34:53 +05:30
opt_data Update OpenNMT-py to c20dbeac02688918607637f5f30ec73c0f17d817 2020-04-08 02:49:16 +05:30
pred.out Included the Machine Translation Code in the repository 2019-07-23 13:34:53 +05:30
requirements.txt Add exact versions in requirements.txt 2021-02-08 10:17:08 +05:30

README.md

Interactive Neural Machine Translation

Assisting Translators with on-the-fly Translation Suggestions

license license

license license license

license

Introduction

Interactive Machine Translation app uses Django and jQuery as its tech stack. Please refer to their docs for any doubts.

Installation Instructions

I. Prerequisites

  1. Clone INMT and prepare MT models:
git clone https://github.com/microsoft/inmt
  1. Make a new model folder using mkdir model where the models need to be placed. Models can be downloaded from here. These contain English to Hindi translation models in both directions.

  2. If you want to train your own models, refer to Training MT Models.

Rest of the installation can be carried out either bare or using docker. Docker is preferable for its ease of installation.

II. Docker Installation

Assuming you have docker setup in your system, simply run docker-compose up -d. This application requires atleast 4GB of memory in order to run. Allot your docker memory accordingly.

III. Bare Installation

  1. Install dependencies using - python -m pip install -r requirements.txt. Be sure to check your python version. This tool is compatible with Python3.
  2. Install OpenNMT dependences using - cd opennmt & python setup.py install & cd -
  3. Run the migrations and start the server - python manage.py makemigrations && python manage.py migrate && python manage.py runserver
  4. The server opens on port 8000 by default. Open localhost:8000/simple for the simple interface.

Training MT Models

OpenNMT is used as the translation engine to power INMT. In order to train your own models, you need parallel sentences in your desired language. The basic instructions are listed as follows:

  1. Go to opennmt folder: cd opennmt
  2. Preprocess parallel (src & tgt) sentences: onmt_preprocess -train_src data/src-train.txt -train_tgt data/tgt-train.txt -valid_src data/src-val.txt -valid_tgt data/tgt-val.txt -save_data data/demo
  3. Train your model (with GPUs): onmt_train -data data/demo -save_model demo-model

For advanced instructions on the training process, refer to OpenNMT docs.

Citation

If you find this work helpful, especially for research work, do consider citing us:

@inproceedings{santy-etal-2019-inmt,
    title = "{INMT}: Interactive Neural Machine Translation Prediction",
    author = "Santy, Sebastin  and
      Dandapat, Sandipan  and
      Choudhury, Monojit  and
      Bali, Kalika",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP): System Demonstrations",
    month = nov,
    year = "2019",
    address = "Hong Kong, China",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/D19-3018",
    doi = "10.18653/v1/D19-3018",
    pages = "103--108",
}

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.