distance#

scikitplot.levenshtein.distance(a, b, *, backend='auto', strict=False)[source]#

Return the Levenshtein edit distance between two sequences.

Parameters:
a, bsequence-like

Strings, bytes, or sequence-like values. The pure-Python and bundled internal backends support general sequences. External libraries may impose narrower type constraints.

backendstr, optional

"auto" (default), "internal", "rapidfuzz", "levenshtein" or "python".

strictbool, optional

If an explicitly selected backend is unavailable, raise instead of warning and falling back to the automatic safe chain.

Parameters:
Return type:

int