Thread: [DOCS] Levenshtein function cost parameters are in the wrong order

[DOCS] Levenshtein function cost parameters are in the wrong order

From
marco.pennekamp96@gmail.com
Date:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.6/static/fuzzystrmatch.html
Description:

The fuzzystrmatch documentation says that the order for the Levenshtein cost
parameters is insertion, deletion, substitution. Based on my tests with
Postgres 9.4, the order should be deletion, insertion, substitution, since
the algorithm behaves that way (this can be easily checked).

--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

Re: [DOCS] Levenshtein function cost parameters are in the wrong order

From
Marko Tiikkaja
Date:
On Mon, Oct 2, 2017 at 5:37 PM, <marco.pennekamp96@gmail.com> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.6/static/fuzzystrmatch.html
Description:

The fuzzystrmatch documentation says that the order for the Levenshtein cost
parameters is insertion, deletion, substitution. Based on my tests with
Postgres 9.4, the order should be deletion, insertion, substitution, since
the algorithm behaves that way (this can be easily checked).

I did check, and they seem correct to me:

  =# select levenshtein('aaa', 'aaab', 1, 100, 100);
   levenshtein
  -------------
             1
  (1 row)

Notice that the order of the first two arguments is (source, target).


.m

Re: [DOCS] Levenshtein function cost parameters are in the wrong order

From
Marco Pennekamp
Date:
Oh, yeah. I didn't think about the source/target order! Thank you for checking and sorry for the inconvenience! 

On Tue, Oct 3, 2017 at 2:34 PM Marko Tiikkaja <marko@joh.to> wrote:
On Mon, Oct 2, 2017 at 5:37 PM, <marco.pennekamp96@gmail.com> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.6/static/fuzzystrmatch.html
Description:

The fuzzystrmatch documentation says that the order for the Levenshtein cost
parameters is insertion, deletion, substitution. Based on my tests with
Postgres 9.4, the order should be deletion, insertion, substitution, since
the algorithm behaves that way (this can be easily checked).

I did check, and they seem correct to me:

  =# select levenshtein('aaa', 'aaab', 1, 100, 100);
   levenshtein
  -------------
             1
  (1 row)

Notice that the order of the first two arguments is (source, target).


.m