TREngine is python library based on 4 translators engines
Project description
Install:
pip install trengine
About this project:
-
TREngine is python library based on 4 translators engines with OCR:
-
Translate ( translate.com )
-
Google ( translate.google.com )
-
Hozory ( hozory.com )
-
Translatedict ( translatedict.com )
-
OCR ( ocr.space )
-
Supporting Sync & Async.
How to use?
- Here an example to use it:
from trengine import Engine
eng = Engine()
text = "Hola, mi amor"
print(
eng.google.translate(text, "en"), "\n",
eng.tr.translate(text, "en"), "\n",
eng.hozory.translate(text, "en"), "\n",
eng.tdict.translate(text, "en"), "\n",
)
# OCR
print(eng.ocr.from_image("./test.png"))
- Here an async example:
import asyncio
from trengine import AsyncEngine
eng = AsyncEngine()
text = "Hola, mi amor"
async def main():
print(
await eng.google.translate(text, "en"), "\n",
await eng.tr.translate(text, "en"), "\n",
await eng.hozory.translate(text, "en"), "\n",
await eng.tdict.translate(text, "en"), "\n",
)
# OCR
print(await eng.ocr.from_image("./test.png"))
asyncio.run(main())
Thanks for:
- @dev-rio for Speech Recognition API.
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
trengine-2.7.tar.gz
(7.1 kB
view details)
Built Distribution
trengine-2.7-py3-none-any.whl
(10.5 kB
view details)
File details
Details for the file trengine-2.7.tar.gz
.
File metadata
- Download URL: trengine-2.7.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e734cbc9daa945fcb6db45e096f01ae973d25725f2fd181f09f2ca4cd15be5d |
|
MD5 | a82f9651e6ae330d34ccbb62fd5d8e05 |
|
BLAKE2b-256 | f291305cf900a6bed2104dee0e2c0ce1f4897d551a28b86926b0ae235e23ea77 |
File details
Details for the file trengine-2.7-py3-none-any.whl
.
File metadata
- Download URL: trengine-2.7-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a3e87f1f70f23e395f4def2e94a8639eb6cbd0c9800aeb1fe11c1ade7d90828 |
|
MD5 | a9d2b26a97b7767ae56be4925a38cc45 |
|
BLAKE2b-256 | 70c0212a84d2e01c26a3d2f530870b04298fa6c88c059cb8e6bc0cade3d6738f |