or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/python-levenshtein@0.27.x
tile.json

tessl/pypi-python-levenshtein

tessl install tessl/pypi-python-levenshtein@0.27.0

Python 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%

task.mdevals/scenario-3/

Text Revision Similarity Analyzer

Build a tool that analyzes the similarity between different versions of document drafts by comparing them as sequences of words. The tool should preserve the order of words when computing similarity, making it suitable for tracking how much documents have changed across revisions.

Capabilities

Compare document revisions

  • Given two document versions as lists of words, the analyzer computes their similarity score considering word order @test
  • Given identical document versions, the analyzer returns a similarity score of 1.0 @test
  • Given completely different document versions with no common words, the analyzer returns a similarity score of 0.0 @test

Identify most similar revision

  • Given a target document and multiple candidate revisions, the analyzer identifies which candidate is most similar to the target based on word sequence @test

Implementation

@generates

API

def compute_similarity(doc1: list[str], doc2: list[str]) -> float:
    """
    Computes similarity between two documents represented as word sequences.

    Args:
        doc1: First document as a list of words
        doc2: Second document as a list of words

    Returns:
        float: Similarity score between 0.0 (completely different) and 1.0 (identical)
    """
    pass

def find_most_similar(target: list[str], candidates: list[list[str]]) -> int:
    """
    Finds the index of the most similar document from a list of candidates.

    Args:
        target: Target document as a list of words
        candidates: List of candidate documents, each as a list of words

    Returns:
        int: Index of the most similar candidate document
    """
    pass

Dependencies { .dependencies }

Levenshtein { .dependency }

Provides string similarity algorithms including sequence comparison.