tessl install tessl/pypi-python-bidi@0.6.0Python 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%
A testing utility that compares the behavior and performance characteristics of different bidirectional text processing implementations.
Build a function that processes the same text through both available implementations and returns their outputs for comparison.
Build a function that identifies when the two implementations produce different results or support different features.
Build a function that measures and compares processing time between implementations for a given text.
@generates
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
"""Provides bidirectional text processing with dual implementation architecture.
@satisfied-by