Python Bidi layout wrapping the Rust crate unicode-bidi
Overall
score
93%
{
"context": "This evaluation assesses how well the engineer uses the python-bidi package's internal algorithm implementation to access the storage structures used by the Unicode BiDi Algorithm, including base direction, character embedding levels, and bidirectional types.",
"type": "weighted_checklist",
"checklist": [
{
"name": "get_base_level usage",
"description": "Uses get_base_level() function from the bidi package to determine the base paragraph direction level (returns 0 for LTR, 1 for RTL)",
"max_score": 15
},
{
"name": "Algorithm module access",
"description": "Imports and uses functions from bidi.algorithm module (Python implementation) to access internal BiDi processing, rather than only using the high-level get_display() wrapper",
"max_score": 20
},
{
"name": "Storage initialization",
"description": "Calls get_empty_storage() to initialize the internal storage structure, or uses other algorithm functions that return the storage dictionary with base_level, base_dir, chars, and runs",
"max_score": 20
},
{
"name": "Explicit level processing",
"description": "Uses explicit_embed_and_overrides() or similar algorithm stage functions to process the text and populate the storage structure with character-level embedding information",
"max_score": 20
},
{
"name": "Character data extraction",
"description": "Accesses the storage['chars'] list to extract character information where each character entry has 'ch', 'level', and 'type' fields representing the character, its embedding level, and its BiDi type",
"max_score": 20
},
{
"name": "Base direction mapping",
"description": "Correctly maps the integer base level to the string base direction ('L' for 0, 'R' for 1) using either the storage['base_dir'] field or manual conversion",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-python-bididocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10