tessl install tessl/pypi-googletrans@4.0.0An unofficial Google Translate API for Python providing free text translation and language detection capabilities
Agent Success
Agent success rate when using this tile
100%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.01x
Baseline
Agent success rate without this tile
99%
{
"context": "This criteria evaluates how well the engineer uses googletrans's language code handling capabilities to validate text against declared languages. It focuses on proper usage of language detection, language code normalization, and the LANGUAGES/LANGCODES dictionaries for validation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Translator instantiation",
"description": "Creates a Translator instance from googletrans and properly uses it as an async context manager with 'async with'",
"max_score": 15
},
{
"name": "Language detection",
"description": "Uses the Translator.detect() method to identify the language of the input text and accesses the detected language code from the returned Detected object",
"max_score": 25
},
{
"name": "Language validation",
"description": "Validates the declared language identifier using googletrans's LANGUAGES or LANGCODES dictionaries to ensure it's a supported language, raising ValueError for invalid languages",
"max_score": 20
},
{
"name": "Language normalization",
"description": "Normalizes the declared language identifier to a standard language code by handling various input formats (language codes, full names, case-insensitive input, RFC 1766 format) using LANGUAGES/LANGCODES",
"max_score": 25
},
{
"name": "Confidence access",
"description": "Accesses and returns the confidence score from the Detected object returned by the detect() method",
"max_score": 10
},
{
"name": "Proper async handling",
"description": "Correctly uses async/await syntax with the Translator's async methods (detect) and properly defines the function as async",
"max_score": 5
}
]
}