tessl install tessl/pypi-python-levenshtein@0.27.0Python compatibility wrapper for computing string edit distances and similarities using fast Levenshtein algorithms.
Agent Success
Agent success rate when using this tile
88%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.38x
Baseline
Agent success rate without this tile
64%
Build a simple text difference visualization tool that identifies and displays common unchanged sections between two versions of text.
@generates
The tool should analyze two input strings and return information about all contiguous sequences that are common between them. Each common block should include:
def find_common_blocks(text1: str, text2: str) -> list:
"""
Finds all contiguous common subsequences between two strings.
Args:
text1: The first text string
text2: The second text string
Returns:
A list of tuples, where each tuple contains:
(start_position_in_text1, start_position_in_text2, block_length)
Example:
find_common_blocks("hello world", "hello there world")
Returns: [(0, 0, 6), (6, 12, 5)]
"""
passProvides string comparison and edit distance algorithms.