Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Schickedanz AbcAeffchen

View GitHub Profile
@AbcAeffchen
AbcAeffchen / levenshtein.sql
Created Feb 26, 2018
MySQL - ReducedLevenshtein
View levenshtein.sql
-- store this as a procedure lv_leq_2. To be able to call this "revursivly"
-- you have to add this function a second time named lv_leq_1. lv_leq_0 stopps
-- the recursion and just compares if two strings are equal.
BEGIN
DECLARE s1_len, s2_len, i INT;
SET s1_len = CHAR_LENGTH(s1), s2_len = CHAR_LENGTH(s2), i = 1;
IF s1 = s2 THEN
RETURN TRUE;
ELSEIF ABS(s1_len - s2_len) > 3 THEN
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object: