Skip to main content

Python Formatters, Linters, and Testers Runner.

Project description

translatedoc

PDFなどのドキュメントを翻訳するツール。

Unstructuredで読み込み、OpenAI APIに渡しているだけ。

インストール

1. Unstructured

インストール例:

sudo apt install poppler-utils poppler-data
sudo apt install tesseract-ocr tesseract-ocr-jpn
pip install unstructured[all-docs]

詳細はUnstructuredのドキュメントを参照。

2. translatedoc

pip install translatedoc

使い方

# export OPENAI_API_BASE=<your_api_base>  # default: https://api.openai.com/v1
export OPENAI_API_KEY=<your_api_key>
translatedoc --language=Japanese <input_files_and_or_urls>

カレントディレクトリにファイル名.Source.txtファイル名.Japanese.txtが生成される。

詳細は translatedoc --help を参照。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

translatedoc-1.0.0.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

translatedoc-1.0.0-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page