ChatGPT-for-Translation  by Raychanan

CLI tool for document translation using ChatGPT

created 2 years ago
392 stars

Top 74.5% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a Python-based tool for translating documents using ChatGPT, targeting users who need to translate text files or entire folders. It offers direct and bilingual output formats, with specific optimizations for PDF parsing via Grobid.

How It Works

The tool leverages the OpenAI API (or Azure OpenAI) to perform translations. Users specify an input file or folder, an optional target language, and their API key. It processes various file formats (.pdf, .txt, .md, .html, .rtf), with a specialized parser built on Grobid for enhanced PDF content extraction. The output includes a direct translation and a bilingual version.

Quick Start & Requirements

  • Install: pip install -r requirements.txt --quiet
  • Run: python ChatGPT-translate.py --input_path=<path> --openai_key=<key>
  • Prerequisites: OpenAI API key or Azure OpenAI endpoint/deployment name. A linked payment method for OpenAI API is recommended to avoid rate limits.
  • Docs: Google Colab

Highlighted Details

  • Supports translation of .pdf, .txt, .md, .html, and .rtf files.
  • Generates both direct and bilingual translated files.
  • PDF parsing is optimized using Grobid.
  • Allows specifying target languages and models (e.g., GPT-4).

Maintenance & Community

No specific community links or maintenance details are provided in the README.

Licensing & Compatibility

The repository does not explicitly state a license.

Limitations & Caveats

The tool requires an OpenAI API key with a linked payment method to avoid strict rate limits. The PDF parser relies on Grobid, which may have its own dependencies or limitations. No explicit license is mentioned, which could impact commercial use.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.