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-1/

BiDi Text Comparator

A testing utility that compares the behavior and performance characteristics of different bidirectional text processing implementations.

Capabilities

Compare Implementation Outputs

Build a function that processes the same text through both available implementations and returns their outputs for comparison.

  • Processing "Hello שלום" returns outputs from both implementations @test
  • Processing mixed text with numbers "123 ברכות 456" returns outputs from both implementations @test

Detect Implementation Differences

Build a function that identifies when the two implementations produce different results or support different features.

  • When testing with uppercase-as-RTL debugging mode, detect which implementation supports this feature @test
  • When both implementations produce the same output for "שלום עולם", report that outputs match @test

Performance Measurement

Build a function that measures and compares processing time between implementations for a given text.

  • Processing "שלום עולם " repeated 20 times returns timing measurements for both implementations, with timing values being positive floats @test

Implementation

@generates

API

def compare_implementations(text: str, encoding: str = "utf-8", base_dir: str = None) -> dict:
    """
    Process text through both implementations and return their outputs.

    Args:
        text: Input text to process
        encoding: Character encoding (default: "utf-8")
        base_dir: Optional base direction override ('L' or 'R')

    Returns:
        Dictionary with keys 'python' and 'rust' containing the display output from each implementation
    """

def detect_feature_support(feature: str) -> dict:
    """
    Check which implementations support a specific feature.

    Args:
        feature: Feature name to check (e.g., "upper_is_rtl", "debug")

    Returns:
        Dictionary with keys 'python' and 'rust', values are True/False for support
    """

def measure_performance(text: str, iterations: int = 100) -> dict:
    """
    Measure processing time for both implementations.

    Args:
        text: Text to process
        iterations: Number of times to process (default: 100)

    Returns:
        Dictionary with keys 'python' and 'rust' containing average processing time in seconds
    """

Dependencies { .dependencies }

python-bidi { .dependency }

Provides bidirectional text processing with dual implementation architecture.

@satisfied-by