or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/python-bidi@0.6.x
tile.json

tessl/pypi-python-bidi

tessl install tessl/pypi-python-bidi@0.6.0

Python Bidi layout wrapping the Rust crate unicode-bidi

Agent Success

Agent success rate when using this tile

93%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.09x

Baseline

Agent success rate without this tile

85%

task.mdevals/scenario-6/

BiDi Text Analyzer with Debug Tracing

A tool for analyzing bidirectional text with debug output showing algorithm execution details.

Capabilities

Process text with debug mode

  • Given text "Hello World" with debug enabled, returns reordered text and outputs algorithm trace to stderr @test
  • Given text "car is THE CAR" with uppercase treated as RTL and debug enabled, outputs trace showing RTL processing @test

Show detailed execution trace

  • Debug output includes algorithm stage names like "explicit_embed_and_overrides" @test
  • Debug output shows base level (0 or 1) and base direction (L or R) @test

Implementation

@generates

API

def analyze_bidirectional_text(text: str, debug: bool = False, uppercase_as_rtl: bool = False) -> str:
    """
    Analyzes and reorders bidirectional text.

    When debug is True, outputs detailed algorithm execution trace to stderr.
    When uppercase_as_rtl is True, treats uppercase letters as RTL for testing.

    Args:
        text: The input text in logical order
        debug: Enable debug trace output (default: False)
        uppercase_as_rtl: Treat uppercase as RTL for testing (default: False)

    Returns:
        The text reordered for visual display
    """
    pass

Dependencies { .dependencies }

python-bidi { .dependency }

Provides bidirectional text processing with debug capabilities.

@satisfied-by