Class - Damerau-Levenshtein distance

Coding Critique is the place to post source code for peer review by other members of DevNetwork. Any kind of code can be posted. Code posted does not have to be limited to PHP. All members are invited to contribute constructive criticism with the goal of improving the code. Posted code should include some background information about it and what areas you specifically would like help with.

Popular code excerpts may be moved to "Code Snippets" by the moderators.

Moderator: General Moderators

User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Class - Damerau-Levenshtein distance

Post by VladSun »

Thank you :)
There are 10 types of people in this world, those who understand binary and those who don't
vdelau
Forum Newbie
Posts: 1
Joined: Tue Feb 23, 2010 4:50 am

Re: Class - Damerau-Levenshtein distance

Post by vdelau »

Thanks, this works like a charm!

Small issue: You should set PHP_DAMERAU_LEVENSHTEIN_EXTNAME to something other then "hello" ;)

Vincent
Last edited by vdelau on Tue Feb 23, 2010 5:57 am, edited 1 time in total.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Class - Damerau-Levenshtein distance

Post by VladSun »

Fixed, thanks :)
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Class - Damerau-Levenshtein distance

Post by Benjamin »

Very nice. I will definitely vote for you for best code snippet. This will come in handy too!

EDIT: Facepalm! Where are the missing braces!?!?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Class - Damerau-Levenshtein distance

Post by VladSun »

astions wrote:Very nice. I will definitely vote for you for best code snippet. This will come in handy too!

EDIT: Facepalm! Where are the missing braces!?!?
Thanks :)
I'm a Python fan :P
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Class - Damerau-Levenshtein distance

Post by VladSun »

Benjamin wrote:Very nice. I will definitely vote for you for best code snippet. This will come in handy too!
OK, thank you :twisted:

PS: Just joking, really. I just wanted to see how to write PHP extensions.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Class - Damerau-Levenshtein distance

Post by VladSun »

The Damerau-Levenshtein distance extension license is GPL v.3

http://www.gnu.org/licenses/gpl.html
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply