mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-05 21:49:19 +02:00
Improve levenshtein() docs.
Fix chars-vs-bytes confusion here too. Improve poor grammar and markup.
This commit is contained in:
parent
47acf3add3
commit
042a3e2353
@ -106,15 +106,20 @@ levenshtein_less_equal(text source, text target, int max_d) returns int
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Both <literal>source</literal> and <literal>target</literal> can be any
|
Both <literal>source</literal> and <literal>target</literal> can be any
|
||||||
non-null string, with a maximum of 255 bytes. The cost parameters
|
non-null string, with a maximum of 255 characters. The cost parameters
|
||||||
specify how much to charge for a character insertion, deletion, or
|
specify how much to charge for a character insertion, deletion, or
|
||||||
substitution, respectively. You can omit the cost parameters, as in
|
substitution, respectively. You can omit the cost parameters, as in
|
||||||
the second version of the function; in that case they all default to 1.
|
the second version of the function; in that case they all default to 1.
|
||||||
<literal>levenshtein_less_equal</literal> is accelerated version of
|
</para>
|
||||||
levenshtein function for low values of distance. If actual distance
|
|
||||||
is less or equal then max_d, then <literal>levenshtein_less_equal</literal>
|
<para>
|
||||||
returns accurate value of it. Otherwise this function returns value
|
<function>levenshtein_less_equal</function> is an accelerated version of the
|
||||||
which is greater than max_d.
|
Levenshtein function for use when only small distances are of interest.
|
||||||
|
If the actual distance is less than or equal to <literal>max_d</>,
|
||||||
|
then <function>levenshtein_less_equal</function> returns the correct
|
||||||
|
distance; otherwise it returns some value greater than <literal>max_d</>.
|
||||||
|
If <literal>max_d</> is negative then the behavior is the same as
|
||||||
|
<function>levenshtein</function>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
Loading…
Reference in New Issue
Block a user