How to use the textdistance.algorithms.edit_based.Jaro function in textdistance

To help you get started, we’ve selected a few textdistance examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github life4 / textdistance / textdistance / algorithms / edit_based.py View on Github external
return 1
            if 1 - float(maxlen - ham) / maxlen <= self.threshold:
                return 1
            mismatches += 1
            ham -= 1
            maxlen -= 1

        if not maxlen:
            return 1
        return 0


hamming = Hamming()
levenshtein = Levenshtein()
damerau = damerau_levenshtein = DamerauLevenshtein()
jaro = Jaro()
jaro_winkler = JaroWinkler()
needleman_wunsch = NeedlemanWunsch()
smith_waterman = SmithWaterman()
gotoh = Gotoh()
strcmp95 = StrCmp95()
mlipns = MLIPNS()
github life4 / textdistance / textdistance / algorithms / edit_based.py View on Github external
def __init__(self, long_tolerance=False, qval=1, external=True):
        super(Jaro, self).__init__(
            long_tolerance=long_tolerance,
            winklerize=False,
            qval=qval,
            external=external)