Edit Tree Distance

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kisehi
Forum Newbie
Posts: 2
Joined: Mon May 08, 2006 12:58 pm

Edit Tree Distance

Post by kisehi »

Hi, I'm new in this forum and this is my first participation. My question is quite simple. Is there any implementation in PHP of the tree edit distance algorithm for comparing strings and detecting misspellings? Thanks for your answer :)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

As part of the core PHP distribution? Good question. I don't think so. I bet Feyd would know.

Have you googled this yet?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

There is a function to calculate the levenshtein distance between two strings. Check the String section of the manual. There are also several spelling libraries available. Check the manual for those as well.
(#10850)
kisehi
Forum Newbie
Posts: 2
Joined: Mon May 08, 2006 12:58 pm

Thnx

Post by kisehi »

Thnx everyone for your quick answer. I'll take a look and try to solve my problem. If not I swear I'll back!
User avatar
dibyendrah
Forum Contributor
Posts: 491
Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:

Post by dibyendrah »

User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

That is so cool. I had no idea that was even there :oops: .
Post Reply