Skip to content

Commit 2422d8a

Browse files
committed
Fix incorrect editops results
1 parent c8bf132 commit 2422d8a

File tree

6 files changed

+19
-14
lines changed

6 files changed

+19
-14
lines changed

CITATION.bib

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
@software{max_bachmann_2021_5501155,
1+
@software{max_bachmann_2021_5584996,
22
author = {Max Bachmann},
3-
title = {maxbachmann/RapidFuzz: Release 1.6.1},
4-
month = sep,
3+
title = {maxbachmann/RapidFuzz: Release 1.8.0},
4+
month = oct,
55
year = 2021,
66
publisher = {Zenodo},
7-
version = {v1.6.1},
8-
doi = {10.5281/zenodo.5501155},
9-
url = {https://doi.org/10.5281/zenodo.5501155}
10-
}
7+
version = {v1.8.0},
8+
doi = {10.5281/zenodo.5584996},
9+
url = {https://doi.org/10.5281/zenodo.5584996}
10+
}

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.0
1+
1.8.1

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'Max Bachmann'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '1.8.0'
25+
release = '1.8.1'
2626

2727

2828
# -- General configuration ---------------------------------------------------

src/rapidfuzz-cpp

src/rapidfuzz/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"""
44
__author__ = "Max Bachmann"
55
__license__ = "MIT"
6-
__version__ = "1.8.0"
6+
__version__ = "1.8.1"
77

88
from rapidfuzz import process, fuzz, utils, levenshtein, string_metric

tests/test_string_metric.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,15 @@ def test_levenshtein_editops():
5757
"""
5858
basic test for levenshtein_editops
5959
"""
60-
assert string_metric.levenshtein_editops("0", "") == [("delete", 1, 0)]
61-
assert string_metric.levenshtein_editops("", "0") == [("insert", 0, 1)]
60+
assert string_metric.levenshtein_editops("0", "") == [("delete", 0, 0)]
61+
assert string_metric.levenshtein_editops("", "0") == [("insert", 0, 0)]
6262
assert string_metric.levenshtein_editops("qabxcd", "abycdf") == [
63-
("delete", 1, 0), ("replace", 4, 3), ("insert", 6, 6)
63+
("delete", 0, 0), ("replace", 3, 2), ("insert", 6, 5)
64+
]
65+
assert string_metric.levenshtein_editops("Lorem ipsum.", "XYZLorem ABC iPsum") == [
66+
("insert", 0, 0), ("insert", 0, 1), ("insert", 0, 2), ("insert", 5, 8),
67+
("insert", 5, 9), ("insert", 5, 10), ("insert", 5, 11), ("replace", 7, 14),
68+
("delete", 11, 18)
6469
]
6570

6671
def test_help():

0 commit comments

Comments
 (0)