Python compatibility wrapper for computing string edit distances and similarities using fast Levenshtein algorithms.
88
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.
Install with Tessl CLI
npx tessl i tessl/pypi-python-levenshteindocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10