Interactive Neural Machine Translation tool
Перейти к файлу
Sebastin Santy bac1a7c870 Fix opennmt naming changes 2020-04-09 04:15:18 +05:30
.ipynb_checkpoints Included the Machine Translation Code in the repository 2019-07-23 13:34:53 +05:30
InteractiveTranslation Merged PR 6: Add mouse suggestion selection functionality 2020-01-13 11:03:21 +00:00
analysis Merged PR 7: User Study Analysis 2020-01-13 11:10:14 +00:00
docs Add Github Pages 2020-03-25 21:18:26 +05:30
gpt Add Simple Interfacefeatures to Keystroke Interface 2019-08-08 11:32:07 +05:30
mt Fix opennmt naming changes 2020-04-09 04:15:18 +05:30
mtpara Add Simple Interfacefeatures to Keystroke Interface 2019-08-08 11:32:07 +05:30
mtsimple Fix opennmt naming changes 2020-04-09 04:15:18 +05:30
opennmt Update OpenNMT-py to c20dbeac02688918607637f5f30ec73c0f17d817 2020-04-08 02:49:16 +05:30
static Change keystroke map aesthetics 2020-02-27 21:39:21 +05:30
templates Change keystroke map aesthetics 2020-02-27 21:39:21 +05:30
.azure-demo Included the Machine Translation Code in the repository 2019-07-23 13:34:53 +05:30
.gitignore Fix opennmt naming changes 2020-04-09 04:15:18 +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 OpenNMT-py to c20dbeac02688918607637f5f30ec73c0f17d817 2020-04-08 02:49:16 +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
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 Update OpenNMT-py to c20dbeac02688918607637f5f30ec73c0f17d817 2020-04-08 02:49:16 +05:30

README.md

Introduction

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

Installation Instructions

  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. If you want to train your own models, refer to Training MT Models

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

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.

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.

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.