Skip to content

Commit 58cb303

Browse files
authored
fix levenstein ratio for python (#3872)
1 parent 743d62f commit 58cb303

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pontoon/base/models/translation_memory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def python_levenshtein_ratio(self, text, min_quality, min_dist, max_dist):
106106
for pk, source in possible_matches:
107107
quality = round((1 - normalized_distance(text, source)) * 100)
108108

109-
if quality > min_quality:
109+
if quality > min_quality * 100:
110110
matches_pks.append(pk)
111111
quality_sql_map.append(When(pk=pk, then=Value(quality)))
112112

0 commit comments

Comments
 (0)