(s1: str | Sequence[str], s2: str | Sequence[str])
return edits.levenshtein(str1, str2)
Measure the similarity between two strings or sequences of strings
    using Levenshtein distance, only with non-alphanumeric characters removed
    and the ordering of tokens in each sorted before comparison.

    Args:
        s1
        s2

    Returns:
        Similarity between ``s1`` and ``s2`` in the interval [0.0, 1.0],
        where larger values correspond to more similar strings.

    See Also:
        :func:`textacy.similarity.edits.levenshtein()`
Measure the similarity between two strings or sequences of strings
    using Levenshtein distance, only with non-alphanumeric characters removed
    and the ordering of tokens in each sorted before comparison.
Measure the similarity between two strings or sequences of strings using Levenshtein distance only with non - alphanumeric characters removed and the ordering of tokens in each sorted before comparison .
def token_sort_ratio(s1: str | Sequence[str], s2: str | Sequence[str]) -> float:
    """
    Measure the similarity between two strings or sequences of strings
    using Levenshtein distance, only with non-alphanumeric characters removed
    and the ordering of tokens in each sorted before comparison.

    Args:
        s1
        s2

    Returns:
        Similarity between ``s1`` and ``s2`` in the interval [0.0, 1.0],
        where larger values correspond to more similar strings.

    See Also:
        :func:`textacy.similarity.edits.levenshtein()`
    """
    str1 = _to_prepared_str(s1)
    str2 = _to_prepared_str(s2)
    return edits.levenshtein(str1, str2)
def token_sort_ratio ( s1 : str | Sequence [ str ] , s2 : str | Sequence [ str ] ) -> float : str1 = _to_prepared_str ( s1 ) str2 = _to_prepared_str ( s2 ) return edits . levenshtein ( str1 , str2 )