CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-googletrans

An unofficial Google Translate API for Python providing free text translation and language detection capabilities

100

1.01x
Quality

Pending

Does it follow best practices?

Impact

100%

1.01x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-4/

{
  "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
    }
  ]
}

tile.json