Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit80aa219

Browse files
committed
Improve levenshtein() docs.
Fix chars-vs-bytes confusion here too. Improve poor grammar andmarkup.
1 parenta396144 commit80aa219

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

‎doc/src/sgml/fuzzystrmatch.sgml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,20 @@ levenshtein_less_equal(text source, text target, int max_d) returns int
106106

107107
<para>
108108
Both <literal>source</literal> and <literal>target</literal> can be any
109-
non-null string, with a maximum of 255bytes. The cost parameters
109+
non-null string, with a maximum of 255characters. The cost parameters
110110
specify how much to charge for a character insertion, deletion, or
111111
substitution, respectively. You can omit the cost parameters, as in
112112
the second version of the function; in that case they all default to 1.
113-
<literal>levenshtein_less_equal</literal> is accelerated version of
114-
levenshtein function for low values of distance. If actual distance
115-
is less or equal then max_d, then <literal>levenshtein_less_equal</literal>
116-
returns accurate value of it. Otherwise this function returns value
117-
which is greater than max_d.
113+
</para>
114+
115+
<para>
116+
<function>levenshtein_less_equal</function> is an accelerated version of the
117+
Levenshtein function for use when only small distances are of interest.
118+
If the actual distance is less than or equal to <literal>max_d</>,
119+
then <function>levenshtein_less_equal</function> returns the correct
120+
distance; otherwise it returns some value greater than <literal>max_d</>.
121+
If <literal>max_d</> is negative then the behavior is the same as
122+
<function>levenshtein</function>.
118123
</para>
119124

120125
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp