Skip to content

Commit 490ffe8

Browse files
committed
docs: Fix a few typos
There are small typos in: - Levenshtein/_levenshtein.c Fixes: - Should read `through` rather than `throught`. - Should read `continuing` rather than `contiuning`. - Should read `extremely` rather than `extermely`. - Should read `completeness` rather than `completenes`. - Should read `availability` rather than `avaliability`. Signed-off-by: Tim Gates <tim.gates@iress.com>
1 parent f050e3c commit 490ffe8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Levenshtein.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
* BUT: The algorithm seems to be advantageous only in the case of very
7676
* large sets -- if my estimates are correct (the article itself is quite
7777
* `asymptotic'), say 10^5 at least. On smaller sets either one would get
78-
* only an extermely rough median estimate, or the number of distance
78+
* only an extremely rough median estimate, or the number of distance
7979
* computations would be in fact higher than in the dumb O(n^2) algorithm.
8080
*
8181
* - Improve setmedian() speed with triangular inequality, see:
@@ -123,7 +123,7 @@
123123
#include <assert.h>
124124
#include "Levenshtein.h"
125125

126-
/* FIXME: inline avaliability should be solved in setup.py, somehow, or
126+
/* FIXME: inline availability should be solved in setup.py, somehow, or
127127
* even better in Python.h, like const is...
128128
* this should inline at least with gcc and msvc */
129129
#ifndef __GNUC__
@@ -2263,7 +2263,7 @@ lev_edit_distance(size_t len1, const lev_byte *string1,
22632263
}
22642264
else {
22652265
/* in this case we don't have to scan two corner triangles (of size len1/2)
2266-
* in the matrix because no best path can go throught them. note this
2266+
* in the matrix because no best path can go through them. note this
22672267
* breaks when len1 == len2 == 2 so the memchr() special case above is
22682268
* necessary */
22692269
row[0] = len1 - half - 1;
@@ -2442,7 +2442,7 @@ lev_u_edit_distance(size_t len1, const lev_wchar *string1,
24422442
}
24432443
else {
24442444
/* in this case we don't have to scan two corner triangles (of size len1/2)
2445-
* in the matrix because no best path can go throught them. note this
2445+
* in the matrix because no best path can go through them. note this
24462446
* breaks when len1 == len2 == 2 so the memchr() special case above is
24472447
* necessary */
24482448
row[0] = len1 - half - 1;
@@ -5372,7 +5372,7 @@ lev_opcodes_check_errors(size_t len1, size_t len2,
53725372
if (!nb)
53735373
return 1;
53745374

5375-
/* check completenes */
5375+
/* check completeness */
53765376
if (bops->sbeg || bops->dbeg
53775377
|| bops[nb - 1].send != len1 || bops[nb - 1].dend != len2)
53785378
return LEV_EDIT_ERR_SPAN;
@@ -5627,7 +5627,7 @@ editops_from_cost_matrix(size_t len1, const lev_byte *string1, size_t off1,
56275627
j = len2 - 1;
56285628
p = matrix + len1*len2 - 1;
56295629
while (i || j) {
5630-
/* prefer contiuning in the same direction */
5630+
/* prefer continuing in the same direction */
56315631
if (dir < 0 && j && *p == *(p - 1) + 1) {
56325632
pos--;
56335633
ops[pos].type = LEV_EDIT_INSERT;
@@ -5816,7 +5816,7 @@ ueditops_from_cost_matrix(size_t len1, const lev_wchar *string1, size_t o1,
58165816
j = len2 - 1;
58175817
p = matrix + len1*len2 - 1;
58185818
while (i || j) {
5819-
/* prefer contiuning in the same direction */
5819+
/* prefer continuing in the same direction */
58205820
if (dir < 0 && j && *p == *(p - 1) + 1) {
58215821
pos--;
58225822
ops[pos].type = LEV_EDIT_INSERT;

0 commit comments

Comments
 (0)