Login   Register  
PHP Classes
elePHPant
Icontem

String Similarity: Calculate the similarity of two text strings

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2007-02-27 (7 years ago) RSS 2.0 feedStarStarStarStar 60%Total: 2,288 All time: 1,582 This week: 1,529Up
Version License PHP version Categories  
string-similarity 1.0GNU General Public Lice...5.0Algorithms, PHP 5, Text processing
Description Author  

This class can be used to calculate the similarity of two text strings.

It is a PHP port of the fuzzy string comparison algorithm used in GNU diff also ported to Perl by Marc Lehmann.

The class calculates the similarity index between two strings. A value of 0 means that the strings are entirely different. A value of 1 means that the strings are identical. Other values mean that the strings are different but appear to have a degree of similarity.

Optionally it can limit the level of similarity between the strings that must be satisfied before it stops analyzing the strings. The algorithm stops when the similarity level drops below the specified limit.

Picture of Marius Ciotlos
Name: Marius Ciotlos <contact>
Classes: 1 package by
Country: Romania Romania
Age: 32
All time rank: 121831 in Romania Romania
Week rank: 1874 Down46 in Romania Romania Down

  Files folder image Files  
File Role Description
Accessible without login Plain text file example Example example file
Plain text file String-Similarity Class main class

 Version Control Unique User Downloads Download Rankings  
 0%Total:2,288All time:1,582
 This week:0This week:1,529Up
 User Ratings  
 
 All time
Utility:91%StarStarStarStarStar
Consistency:62%StarStarStarStar
Documentation:-
Examples:87%StarStarStarStarStar
Tests:-
Videos:-
Overall:60%StarStarStarStar
Rank:828