Skip to content

Commit 2909cca

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 07785f1 commit 2909cca

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Levenshtein/_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:
@@ -124,7 +124,7 @@
124124
#include <assert.h>
125125
#include "_levenshtein.h"
126126

127-
/* FIXME: inline avaliability should be solved in setup.py, somehow, or
127+
/* FIXME: inline availability should be solved in setup.py, somehow, or
128128
* even better in Python.h, like const is...
129129
* this should inline at least with gcc and msvc */
130130
#ifndef __GNUC__
@@ -2327,7 +2327,7 @@ lev_edit_distance(size_t len1, const lev_byte *string1,
23272327
}
23282328
else {
23292329
/* in this case we don't have to scan two corner triangles (of size len1/2)
2330-
* in the matrix because no best path can go throught them. note this
2330+
* in the matrix because no best path can go through them. note this
23312331
* breaks when len1 == len2 == 2 so the memchr() special case above is
23322332
* necessary */
23332333
row[0] = len1 - half - 1;
@@ -2506,7 +2506,7 @@ lev_u_edit_distance(size_t len1, const lev_wchar *string1,
25062506
}
25072507
else {
25082508
/* in this case we don't have to scan two corner triangles (of size len1/2)
2509-
* in the matrix because no best path can go throught them. note this
2509+
* in the matrix because no best path can go through them. note this
25102510
* breaks when len1 == len2 == 2 so the memchr() special case above is
25112511
* necessary */
25122512
row[0] = len1 - half - 1;
@@ -5436,7 +5436,7 @@ lev_opcodes_check_errors(size_t len1, size_t len2,
54365436
if (!nb)
54375437
return 1;
54385438

5439-
/* check completenes */
5439+
/* check completeness */
54405440
if (bops->sbeg || bops->dbeg
54415441
|| bops[nb - 1].send != len1 || bops[nb - 1].dend != len2)
54425442
return LEV_EDIT_ERR_SPAN;
@@ -5691,7 +5691,7 @@ editops_from_cost_matrix(size_t len1, const lev_byte *string1, size_t off1,
56915691
j = len2 - 1;
56925692
p = matrix + len1*len2 - 1;
56935693
while (i || j) {
5694-
/* prefer contiuning in the same direction */
5694+
/* prefer continuing in the same direction */
56955695
if (dir < 0 && j && *p == *(p - 1) + 1) {
56965696
pos--;
56975697
ops[pos].type = LEV_EDIT_INSERT;
@@ -5880,7 +5880,7 @@ ueditops_from_cost_matrix(size_t len1, const lev_wchar *string1, size_t o1,
58805880
j = len2 - 1;
58815881
p = matrix + len1*len2 - 1;
58825882
while (i || j) {
5883-
/* prefer contiuning in the same direction */
5883+
/* prefer continuing in the same direction */
58845884
if (dir < 0 && j && *p == *(p - 1) + 1) {
58855885
pos--;
58865886
ops[pos].type = LEV_EDIT_INSERT;

0 commit comments

Comments
 (0)