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 fast_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)TLPTBR_VERBOSE:1para logs detalhados de resolução/download/bootstrap (default0)TLPTBR_FORCE_CLI:1para forçar fallback CLI (útil para ambientes macOS com instabilidade em-p)
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.13.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.13.tar.gz.
File metadata
- Download URL: fast_translate-0.1.13.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 |
d58e147954336f5c59cc50adbde00d2746fcd8b2d888abefba4101629e1658e5
|
|
| MD5 |
91145c95478f92bab0c0883f4ac9b96a
|
|
| BLAKE2b-256 |
8f98cfeeded6a1a7ce3d24e5c4092f5a5a554ae2ef8785173d2f59f377835bec
|
File details
Details for the file fast_translate-0.1.13-py3-none-any.whl.
File metadata
- Download URL: fast_translate-0.1.13-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 |
2bec4e5a637034e4bd9d18e7fd5a469e5c9bfb37498a932a1437d9bae4b0d576
|
|
| MD5 |
c4eea4042e261e98af13137a4f70bc54
|
|
| BLAKE2b-256 |
4a756474eac5260da20c1378d3dddbef9fe56d8042450c8a18ec682a60c4785f
|