Skip to content

Commit f479d39

Browse files
authored
improve documentation
1 parent ca76b07 commit f479d39

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Levenshtein/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ def distance(
137137
def ratio(s1, s2, *, processor=None, score_cutoff=None):
138138
"""
139139
Calculates a normalized indel similarity in the range [0, 1].
140-
This is calculated as ``1 - normalized_distance``
140+
The indel distance calculates the minimum number of insertions and deletions
141+
required to change one sequence into the other.
142+
143+
This is calculated as ``1 - (indel / max(len1, len2))``
141144
142145
Parameters
143146
----------

0 commit comments

Comments
 (0)