/levenshtein-c

Simple Ruby C Levenshtein algorithm lib

Primary LanguageRuby

Dependency Status Gem Version

levenshtein-c

Standard native C levenshtein implementation (inspired by Schuyler'gem) with unicode support, better re-use of MRI 1.9 structs and much faster than the ffi based spawn.

Time: O(n²) Space: O(n)

Installation

gem install levenshtein-c

Example

require 'levenshtein-c.so'

Levenshtein.distance("helloworld", "hello")