Miscellaneous Helper Functions (malign)

The helper functions below are miscellaneous “deep” implementations of alignment and string similarity algorithms. They are implemented both in pure Python and in Cython (only supported for Python 3), in order to allow for faster implementations of the core alignment functions. Instead of using these functions directly, we recommend to use the more general functions which you can find in the pairwise and the multiple module of LingPy, and which are based on the helper functions we list below.

Functions

edit_dist Return the edit-distance between two strings.
nw_align Align two sequences using the Needleman-Wunsch algorithm.
restricted_edit_dist Return the restricted edit-distance between two strings.
structalign Carry out a structural alignment analysis using Dijkstra’s algorithm.
sw_align Align two sequences using the Smith-Waterman algorithm.
we_align Align two sequences using the Waterman-Eggert algorithm.