Skip to content

This repository present a way to serve a English-to-Hindi machine translation model. It also presents a UI, to convert PDF documents to Hindi Language.

License

Notifications You must be signed in to change notification settings

srijan14/Document-Machine-Translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English-Hindi-Digital-Document-Translater

This repository contains the code to convert English Digital Documents(pdf) into Hindi.

Below are the two components present :

1. Machine-Translation

We have used opennmt to train and serve the model.Follow below instructions to start this component:

  1. Installing Dependencies
cd OpenNMT-py && pip install -r requirements.txt --no-cache-dir
  1. Model Download:

Download model from [here] and copy inside the ./OpenNMT-py/available_models folder

  1. Start Server(Will start a server at default port 5000)
python server.py

Below is a sample curl request to test the results:

curl --header "Content-Type: application/json"   --request POST   --data '[{"id":100,"src":"You should refrain from doing this."}]' http://localhost:5000/translator/translate

Tools like postman etc can also be used to test the api.

2 PDF to Converted Text

  1. Installing Dependencies
pip install -r requirements.txt
  1. Start Server (will start a server on port 5001)
export PYTHONPATH=$PWD && python src/app.py
  1. Go to http://localhost:5001/home

Note: Having too many pages in the pdf might take a bit of time for the API to return the results. On successfull processing, a text file with the converted hindi text will be generated.

About

This repository present a way to serve a English-to-Hindi machine translation model. It also presents a UI, to convert PDF documents to Hindi Language.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published