Coder Social home page Coder Social logo

translator_agent's Introduction

Translation Agent: Advanced PDF Linguistic Converter

Welcome to the Translation Agent, an advanced linguistic conversion tool designed to seamlessly extract, translate, and consolidate content from PDF documents. This sophisticated utility leverages OpenAI's GPT model to provide accurate translations, generating a professional certificate of translation and merging the translated text with the original document into a comprehensive file.

Core Features

  • Robust Text Extraction: Efficiently pulls text from any PDF document.
  • Intelligent Translation: Utilizes OpenAI's cutting-edge GPT model for high-quality translations.
  • PDF Generation: Creates a PDF document of the translated text.
  • Certificate of Translation: Automatically generates a verifiable certificate of translation.
  • PDF Merging: Combines the original and translated PDFs into a single document for easy reference.

Installation

Ensure you have Python installed on your system. Then, install the necessary dependencies with the following command:

pip install -r requirements.txt

How to Use

Execute the script from the command line, providing the necessary parameters:

python extract_and_translate.py --pdf_path "path/to/input.pdf" --output "path/to/output.pdf" --api_key "your-openai-api-key" --name "Your Name" --address "Your Address" --language_1 "Source Language" --language_2 "Target Language" --certificate_output "path/to/certificate.pdf"

Sample script

python extract_and_translate.py --pdf_path 'sample.pdf' --output 'test.pdf' --api_key '<YOUR-API-KEY>' --name 'Markus Avrelius' --address '1111 Madeup st, MadeupTown, 94117, CA' --language_1 'Russian' --language_2 'English' --certificate_output 'test_certificate.pdf'

Command-Line Arguments

  • --pdf_path: The path to the input PDF file.
  • --output: The desired path for the output merged PDF file.
  • --api_key: Your OpenAI API key for translation services.
  • --name: The name to be printed on the certificate of translation.
  • --address: The address to be included on the certificate of translation.
  • --language_1: The source language of the original document.
  • --language_2: The target language for the translation.
  • --certificate_output: The file path for the generated certificate of translation PDF.

Contributing

We welcome contributions from the community! If you'd like to contribute to the Translation Agent, please follow these steps:

  1. Fork the repository on GitHub.
  2. Create a new branch for your feature or bug fix.
  3. Develop your changes in your branch.
  4. Ensure your code adheres to the existing style of the project to maintain consistency.
  5. Write or adapt tests as needed.
  6. Submit a pull request with a clear description of your changes.

Licensing

For more details, please refer to the LICENSE file.

Support

For support, feature requests, or contributions, please open an issue in the project's GitHub repository.

translator_agent's People

Contributors

crimeacs avatar

Stargazers

 avatar  avatar Egor Lynov avatar  avatar Andrey avatar Eugene Klimov avatar  avatar  avatar Maksim Kuprienko avatar Don't panic avatar

Watchers

 avatar

Forkers

abaaac

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.