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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for translatedoc-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40ccae1083998f0572d21157d7001f52f8fdb3b6955039b47893f7b397a3298d |
|
MD5 | dc389b66fbc738490abca1eab996b131 |
|
BLAKE2b-256 | d97b1cd943258b2b596d3b643a09a29a45d26b8f377db19ed02c53053163595b |