From c37f82f9fe470c02ef8daf3e840962ba30b729f8 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 9 Nov 2016 12:28:28 +0100 Subject: [PATCH] Bugfix in levenshtein algorithms --- recordlinkage/algorithms/string.py | 2 ++ recordlinkage/comparing.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/recordlinkage/algorithms/string.py b/recordlinkage/algorithms/string.py index 45feaecc..f21fb36c 100644 --- a/recordlinkage/algorithms/string.py +++ b/recordlinkage/algorithms/string.py @@ -1,3 +1,5 @@ +from __future__ import division + import pandas import numpy as np diff --git a/recordlinkage/comparing.py b/recordlinkage/comparing.py index e55f0bad..1f0f55fe 100644 --- a/recordlinkage/comparing.py +++ b/recordlinkage/comparing.py @@ -384,7 +384,7 @@ def _string_internal(s1, s2, method, threshold=None, *args, **kwargs): elif method == 'levenshtein': str_sim_alg = levenshtein_similarity - elif method in ['dameraulevenshtein', 'dameraulevenshtein']: + elif method in ['dameraulevenshtein', 'damerau_levenshtein']: str_sim_alg = damerau_levenshtein_similarity elif method == 'q_gram' or method == 'qgram':