CVS update: php3/doc/functions
| From: | sas | Date: | Mon, 04 Jan 1999 03:43:06 +0000 |
| Subject: | CVS update: php3/doc/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-3234@lists.php.net to get a copy of this message | ||
Date: Sunday January 3, 1999 @ 22:43
Author: sas
Update of /repository/php3/doc/functions
In directory asf:/u/temp/cvs-serv27479/doc/functions
Modified Files:
strings.sgml
Log Message:
add similar_text() function
Index: php3/doc/functions/strings.sgml
diff -c php3/doc/functions/strings.sgml:1.54 php3/doc/functions/strings.sgml:1.55
*** php3/doc/functions/strings.sgml:1.54 Tue Dec 22 15:30:17 1998
--- php3/doc/functions/strings.sgml Sun Jan 3 22:43:05 1999
***************
*** 787,792 ****
--- 787,821 ----
</refsect1>
</refentry>
+ <refentry id="function.similar-text">
+ <refnamediv>
+ <refname>similar_text</refname>
+ <refpurpose>calculate the similarity between two strings</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcdef>int <function>similar_text</function></funcdef>
+ <paramdef>string <parameter>first</parameter></paramdef>
+ <paramdef>string <parameter>second</parameter></paramdef>
+ <paramdef>double
<parameter><optional>percent</optional></parameter></paramdef>
+ </funcsynopsis>
+
+ <para>
+ This calculates the similarity between two strings as
+ described in Oliver [1993]. Note that this implementation does
+ not use a stack as in Oliver's pseudo code, but recursive calls
+ which may or may not speed up the whole process. Note also
+ that the complexity of this algorithm is O(N**3) where N
+ is the length of the longest string.
+
+ <para>
+ By passing a reference as third argument, <function>similar_text</function>
+ will calculate the similarity in percent for you. It returns
+ the number of matching chars in both strings.
+ </refsect1>
+ </refentry>
+
<refentry id="function.soundex">
<refnamediv>
<refname>soundex</refname>
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net