LingPy

This documentation is for version 2.0.dev, which is not released yet.

lingpy.align.pairwise.edit_dist

lingpy.align.pairwise.edit_dist(seqA, seqB, normalized=False, restriction='')

Return the edit distance between two strings.

Parameters :

seqA,seqB : str

The strings that shall be compared.

normalized : bool (default=False)

Specify whether the normalized edit distance shall be returned. If no restrictions are chosen, the edit distance is normalized by dividing by the length of the longer string. If restriction is set to cv (consonant-vowel), the edit distance is normalized by the length of the alignment.

restriction : {‘cv’} (default=’‘)

Specify the restrictions to be used. Currently, only cv is supported. This prohibits matches of vowels with consonants.

This Page