Skip to content

Instantly share code, notes, and snippets.

View 2af's full-sized avatar

Anton Frolov 2af

  • Georgia
View GitHub Profile
@2af
2af / levenshtein.py
Created July 22, 2024 12:31
Levenshtein (editor) distance weighted.
import Levenshtein
def levenshtein(s1: str, s2: str) -> float:
'''
0.0 means perfect match
0.1 very possible match
0.2 less possible match
0.3 likely not a match
'''
def processor(_string: str) -> str:
_string = _string.upper()