Portable EN<->PT-BR translation library with baked-in models and PT-BR postprocessing
Project description
fast-translate
Biblioteca Python portátil para tradução offline:
en -> pt-BRpt -> en
Inclui:
- Modelos baked-in no pacote (
en-pt-tinyept-en-tiny) - Pós-processamento focado em pt-BR (corrige traços pt-PT)
- Runtime nativo com
translateLocallyvia Native Messaging (-p) - Fallback cross-platform: binário empacotado, PATH ou auto-download do GitHub Releases
Instalação
pip install fast-translate
Uso rápido
from tlptbr_translate import Translator
tr = Translator()
print(tr.translate("How are you today?", direction="en-pt"))
print(tr.translate("Como você está hoje?", direction="pt-en"))
tr.close()
Variáveis de ambiente
TLPTBR_BINARY: caminho explícito do executáveltranslateLocallyTLPTBR_CACHE_SIZE: tamanho do cache LRU (default64)TLPTBR_CACHE_MAX_ENTRY_CHARS: tamanho máximo por item de cache (default512)TLPTBR_TRIM_EVERY_N_CALLS: frequência demalloc_trim(default8)TLPTBR_KEEP_WARM_INTERVAL_S: intervalo de warmup (default300)TLPTBR_AUTO_DOWNLOAD:1/0para auto-download de binário (default1)
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
fast_translate-0.1.0.tar.gz
(43.7 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fast_translate-0.1.0.tar.gz.
File metadata
- Download URL: fast_translate-0.1.0.tar.gz
- Upload date:
- Size: 43.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da17c29b7bb95252eab73f618ffd45e1e3869ff489ef3811c0f17bc5e6dbe3e
|
|
| MD5 |
2aa716b55037546e52bf9db97fba85d6
|
|
| BLAKE2b-256 |
9508fe27a92695741134c4457169e5250d877e0b97b335201e56761c66d4e9a8
|
File details
Details for the file fast_translate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fast_translate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 44.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
feb37f8031d92cb56ba6574c934c6793a1b033b2864e428de1ea294dfb852fac
|
|
| MD5 |
b6cf0ff4d89910b392d9605d31135aa2
|
|
| BLAKE2b-256 |
5471be69734bc0999174ddc7db82648b5239a3d85a666e8b5ecdc442f6ea9394
|