How to use the pylev.classic_levenshtein function in pylev

To help you get started, we’ve selected a few pylev 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 toastdriven / pylev / tests.py View on Github external
def test_long(self):
        self.assertEqual(pylev.classic_levenshtein('confide', 'deceit'), 6)
github toastdriven / pylev / tests.py View on Github external
def test_painful(self):
        # This is pretty slow but should work.
        self.assertEqual(pylev.classic_levenshtein('CUNsperrICY', 'conspiracy'), 8)
github toastdriven / pylev / tests.py View on Github external
def test_classic(self):
        self.assertEqual(pylev.classic_levenshtein('kitten', 'sitting'), 3)
github toastdriven / pylev / tests.py View on Github external
def test_empty(self):
        self.assertEqual(pylev.classic_levenshtein('', ''), 0)
github toastdriven / pylev / tests.py View on Github external
def test_same(self):
        self.assertEqual(pylev.classic_levenshtein('kitten', 'kitten'), 0)

pylev

A pure Python Levenshtein implementation that's not freaking GPL'd.

BSD-2-Clause
Latest version published 3 years ago

Package Health Score

67 / 100
Full package analysis