An unofficial Google Translate API for Python providing free text translation and language detection capabilities
Overall
score
100%
Evaluation — 100%
↑ 1.01xAgent success when using this tile
{
"context": "This evaluation assesses how well the engineer uses googletrans's error handling capabilities to build a resilient translation service. The focus is on correctly using the raise_exception parameter, handling both silent and explicit error modes, and properly managing translator resources.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Translator Initialization",
"description": "Correctly initializes Translator with the raise_exception parameter set based on silent_errors mode (raise_exception=False for silent mode, raise_exception=True for explicit mode)",
"max_score": 25
},
{
"name": "Async Context Manager",
"description": "Uses async with statement for Translator to ensure proper resource cleanup (async with Translator(...) as translator)",
"max_score": 15
},
{
"name": "Translation Method Usage",
"description": "Correctly calls translator.translate() with text and dest parameters, using await for async operations",
"max_score": 20
},
{
"name": "Detection Method Usage",
"description": "Correctly calls translator.detect() with text parameter, using await for async operations",
"max_score": 15
},
{
"name": "Silent Mode Handling",
"description": "In silent error mode (raise_exception=False), properly handles the case where translation may return dummy data with original text when API fails",
"max_score": 10
},
{
"name": "Explicit Mode Handling",
"description": "In explicit error mode (raise_exception=True), properly propagates exceptions from translation/detection failures without suppressing them",
"max_score": 10
},
{
"name": "Result Property Access",
"description": "Correctly accesses properties of Translated and Detected result objects (e.g., result.text, result.src, result.dest, result.lang, result.confidence)",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-googletrans@4.0.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10