Code Monkey home page Code Monkey logo

translation_layoutrecovery's Introduction

5tasy

A web app for Paper Translation with Layout Recovery!

Contributors

Name Profile
Phạm Khánh Trình @phkhanhtrinh23
Nguyễn Bảo Tín @nbtin
Yang Tuấn Anh @YangTuanAnh
Nguyễn Hoàng Ngọc Hà @ngochafromdn
Nguyễn Minh Lý @lynguyenminh

1. Table of Contents

2. About The Project

Translation with Layout Recovery is a cutting-edge approach in the field of natural language processing that goes beyond traditional machine translation methods. While conventional translation models focus solely on converting text from one language to another, 5tasy takes into account the visual layout and formatting of the text. This approach aims to preserve not only the linguistic content but also the spatial arrangement, font styles, and other visual elements present in the source text. Some detailed information can be found in this slide and our YouTube presentation.

3. Technical Overview

  • Frontend: NextJS, TailwindCSS, NodeJS, Yarn.
  • Backend: Django REST Framework.
  • Database: PostgreSQL.
  • Storage: Firebase Cloud Storage.
  • Deployment: Docker (Docker-compose).
  • AI Core:
    • NMT: envit5-translation.
    • Layout Recovery: MaskRCNN.
    • OCR: EasyOCR.
    • Spelling Correction (Japanese): JGEC

4. Repo Structure

.
├── Backend
│   ├── account
│   ├── services
│   └── translation
├── Frontend
│   ├── app
│   │   ├── api
│   │   ├── components
│   │   ├── history
│   │   │   └── api
│   │   ├── login
│   │   │   └── api
│   │   ├── profile
│   │   │   └── api
│   │   └── register
│   │       └── api
│   └── public
└── Model
    └── utils
    └── main.py

5. How to Install

To install and run the 5tasy web app, please follow the steps below:

  1. Ensure that Docker is installed on your system. You can download and install Docker from the official website: Docker Engine for Ubuntu or Docker Desktop.

  2. Clone this repository to your local machine using the following command:

    git clone https://github.com/phkhanhtrinh23/translation_layoutrecovery.git
  3. Navigate to the project directory:

    cd translation_layoutrecovery

    Important: Then, put the necessary environment files (.env) in this folder.

  4. Build the Docker image and run the container using the following command:

    docker compose up --build
  5. Wait for the installation process to complete. Once the downloading is done, the web app will be ready to use.

  6. To stop the web app, press Ctrl + C in the terminal and run the following command:

    docker compose down

6. Usage

To use the web app, follow the steps below:

  1. Open your web browser and navigate to http://localhost:3000.

  2. You first need to register the account and sign in to use the web functions.

  3. In the web app, you can browse and upload an English PDF file using the provided interface.

  4. Click to choose the target language and Hit the Translate button to start the translation process.

  5. The model will then process your file and return the translated PDF file with the same layout as the original one. Hit the Translated linklabel or open the History bar to view the result. Here you can open to view and download your files.

  6. You can also search for your files in the History bar by entering the keywords in the search box.

7. References

  • MaskRCNN - phamquiluan - PubLayNet
  • EasyOCR - JadedAI - jaded.ai
  • envit5-translation - Chinh Ngo, Trieu H. Trinh, Long Phan, Hieu Tran, Tai Dang, Hieu Nguyen, Minh Nguyen, Minh-Thang Luong - huggingface.co.
  • opus-mt-en-jap - Helsinki-NLP - huggingface.co.
  • GECToR - Kostiantyn Omelianchuk, Vitaliy Atrasevych, Artem Chernodub, Oleksandr Skurzhanskyi - aclanthology.org
  • Guides on using Docker for Python application - Docker docs.
  • Install Docker Engine on Ubuntu - Docker docs.

Contribution

Contributions are what make GitHub such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the project
  2. Create your Contribute branch: git checkout -b contribute/Contribute
  3. Commit your changes: git commit -m 'add your messages'
  4. Push to the branch: git push origin contribute/Contribute
  5. Open a pull request

translation_layoutrecovery's People

Contributors

nbtin avatar yangtuananh avatar phkhanhtrinh23 avatar lynguyenminh avatar ngochafromdn avatar

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.