Easily translate into various languages using OpenAI, DeepL, and Gemini APIs.
Project description
Table of Contents
EasyTL
Easily translate into various languages using OpenAI, DeepL, and Gemini APIs.
To get started with EasyTL, install the package via pip:
pip install easytl
Then, you can preprocess Japanese text by importing EasyTL and/or KatakanaUtil/Indexer:
from easytl import EasyTL
## set your api keys
EasyTL.set_api_key("deepL", "your_api_key_here")
## you can also validate your api keys, translation functions will do this automatically
EasyTL.validate_api_key("deepL")
EasyTL.deepl_translate("私は日本語が話せます", "EN") ## Text to translate, language to translate to, only two "required" arguments but there are more.
## easytl also has a generic translate method, which defaults to deepl, requires a text, and kwargs for the translate method.
EasyTL.translate("私は日本語が話せます", target_lang="EN")
Python 3.8+
EasyTL can be installed using pip:
pip install easytl
This will install EasyTL along with its dependencies and requirements.
These are the dependencies/requirements that will be installed:
setuptools>=61.0
wheel
setuptools_scm>=6.0
tomli
google-generativeai==0.4.0
deepl==1.16.1
openai==1.13.3
backoff==2.2.1
tiktoken==0.6.0
This project (EasyTL) is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
The GPL is a copyleft license that promotes the principles of open-source software. It ensures that any derivative works based on this project must also be distributed under the same GPL license. This license grants you the freedom to use, modify, and distribute the software.
Please note that this information is a brief summary of the GPL. For a detailed understanding of your rights and obligations under this license, please refer to the full license text.
If you have any questions or suggestions, feel free to reach out to me at Tetralon07@gmail.com.
Also feel free to check out the GitHub repository for this project.
Or the issue tracker here.
Contributions are welcome! I don't have a specific format for contributions, but please feel free to submit a pull request or open an issue if you have any suggestions or improvements.
EasyTL was originally developed as a part of Kudasai, a Japanese preprocessor later turned Machine Translator. It was later split off into its own package to be used independently of Kudasai for multiple reasons.
This package is also my second serious attempt at creating a Python package, so I'm sure there are some things that could be improved. Feedback is welcomed.
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.