Skip to content

Instantly share code, notes, and snippets.

View Rostepher's full-sized avatar

Ross Bayer Rostepher

View GitHub Profile
@Rostepher
Rostepher / metaphone_algorithm_spec.md
Last active June 5, 2023 13:09
Metaphone algorithm explaination.

The Metaphone algorithm was Created by Lawrence Philips. The Metaphone algorithm was first introduced in an article published in "Computer Language" December 1990 issue. Since its inception the algorithm has been updated by the original author, Lawrence Phillips, twice. The second iteration, released in 2000 was the Double Metaphone and the most recent update is the Metaphone 3, realease in 2009 under a proprietary license and as such is unavailable without a purchased license.

Consonant Sounds

There are 16 distinct "consonant sounds" in the metaphone algorithm. B, F, H, J, K, L, M, N, O, P, R, S, T, W, X, Y and 0 (zero) where 0 represents the th sound.

Transformations (Steps)

@Rostepher
Rostepher / damerau_levenshtein.c
Last active October 5, 2018 22:05
A working implementation of the Damerau-Levenshtein distance in C.
// based on the implementation found at:
// https://stackoverflow.com/questions/10727174/damerau-levenshtein-distance-edit-distance-with-transposition-c-implementation
//
// still deciphering the alogrithm from the cryptic vairable names, hopefully thie implementation below
// is easier to read and understand.
#include <assert.h>
#include <stdlib.h>
#include <string.h>