[ccan] [PATCH] edit_distance: calculate edit distance between strings

David Gibson david at gibson.dropbear.id.au
Wed Nov 23 23:58:36 AEDT 2016


On Fri, Nov 18, 2016 at 09:19:25PM -0700, Kevin Locke wrote:
> This commit creates the edit_distance module for calculating various
> edit distance measures.  The edit distance quantifies the similarity
> between two strings based on the number of modifications necessary to
> turn one string into the other.  There are several edit distance
> measures which differ in the operations which are permitted and the
> cost (aka weight) of the operations.  This module provides functions
> for calculating the Longest Common Subsequence (LCS), Levenshtein, and
> Damerau-Levenshtein (restricted and unrestricted) distances.  Weighted
> versions of these functions can be created by defining cost functions
> as preprocessor macros when compiling this module.  Distances over
> other array types (e.g. wide strings, integers, structs) can be
> accomplished by defining the element type and equality test macros.
> 
> Signed-off-by: Kevin Locke <kevin at kevinlocke.name>
> 
> ---
> 
> I have tried to make the inline documentation work with both
> doc_extract and Doxygen.  The formatting of code examples in the
> module comments contains some odd-looking additional formatting to
> make the examples work, but otherwise the combination seemed
> reasonable.  If there's a strong feeling that Doxygen is against the
> project style, I can remove the Doxygen-specific formatting.
> 
> There are a number of additional auxiliary files which I did not
> include in this commit (e.g. .indent.pro, Doxyfile, scripts for
> performance testing and testing against reference libraries), since
> these sorts of files do not appear to be present in any of the other
> modules.  If they would be desirable, I can submit them in an
> additional commit.
> 
> I hope you find the module useful and I look forward to your
thoughts.

I've merged this module in, along with a fix to make the Travis build
happy with it.

Can you please send me an ssh public key, and I'll authorize you to
push changes to this module.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20161123/f45523ee/attachment.sig>


More information about the ccan mailing list