Python compatibility wrapper for computing string edit distances and similarities using fast Levenshtein algorithms.
88
{
"context": "This evaluation assesses how well the engineer uses the Levenshtein package's matching_blocks function to identify contiguous common subsequences between strings. The focus is on proper usage of this specific package capability rather than implementing custom algorithms.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses matching_blocks",
"description": "Code imports and correctly calls Levenshtein.matching_blocks() function to find common blocks between the two input strings",
"max_score": 50
},
{
"name": "Correct function signature",
"description": "The find_common_blocks function accepts two string parameters (text1, text2) and returns a list as specified in the API",
"max_score": 10
},
{
"name": "Returns proper format",
"description": "Function returns a list of tuples where each tuple contains (start_position_in_text1, start_position_in_text2, block_length) matching the expected output format",
"max_score": 15
},
{
"name": "Handles empty matches",
"description": "Solution correctly handles cases where there are no common blocks between strings (returns empty list or appropriate representation)",
"max_score": 10
},
{
"name": "No custom implementation",
"description": "Code relies on Levenshtein.matching_blocks() rather than implementing a custom algorithm for finding matching blocks",
"max_score": 15
}
]
}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