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.8.tar.gz
(7.1 kB
view details)
Built Distribution
trengine-2.8-py3-none-any.whl
(10.5 kB
view details)
File details
Details for the file trengine-2.8.tar.gz
.
File metadata
- Download URL: trengine-2.8.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 | 0bd64aa6e1daaa5f3ca8ab5d9cae1f4a1e4b4ece1a7947740a428193d6913884 |
|
MD5 | 6a4e2a8df9f61eb03c64ac197129da33 |
|
BLAKE2b-256 | 282eb686c11bd622e02050078364371cc291e823c3f0c5ea94f2c9cd351b5324 |
File details
Details for the file trengine-2.8-py3-none-any.whl
.
File metadata
- Download URL: trengine-2.8-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 | 0692461b56bc33e1a92eea3332c3045bcf6f5a5e547b182843873b6fb40092cc |
|
MD5 | 0d1be8836fcfddabda494c71d689b8a5 |
|
BLAKE2b-256 | 26a03058a63f38b08cd356f1b276d65f790297dd43e43ef7f4a88097557b3d1d |