===========
levensthein
===========

This module perform a Levenshtein distance caculation on a mapping
that is calculated in `visitor`. Any mapping can be provided, as long
as its items are objects with two attributes: `code` and `key`.

    >>> class Code(object):
    ...     def __init__(self, key, code):
    ...         self.key = key
    ...         self.code = code
    ...
    >>> code = {'one': Code('one', 'xxxxx'),
    ...         'two': Code('two', 'xxxoxxxx')}


    >>> from levenshtein import search_similarities
    >>> search_similarities(code)
    <generator object at 0x...>

It returns an iterator over similitudes. Since there's a treshold
on how similar are the code elements, fixing it to 0 will return
all comparisons::

    >>> res = search_similarities(code, treshold=0)
    >>> list(res)
    [(0.7..., 'two', 'one')]

Let's add another sample::

    >>> code['three'] = Code('three', 'xxxooooooo')

    >>> res = search_similarities(code, treshold=0)
    >>> list(res)
    [(0.4..., 'three', 'two'), (0.4..., 'three', 'one'),
     (0.7..., 'two', 'one')]



