Skip to content

Commit

Permalink
Prep the branch for merge.
Browse files Browse the repository at this point in the history
  - Add additional test cases for Berghel & Roach
  - Update NEWS
  - Update ChangeLog
  • Loading branch information
sp1ff committed Jul 2, 2024
1 parent 3b480ab commit 14d5ba2
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 9 deletions.
27 changes: 27 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
2024-07-02 Michael Herstine <sp1ff@pobox.com>

Add additional test cases for Berghel & Roach.

2024-07-02 Michael Herstine <sp1ff@pobox.com>

Fix issue #5.
Berghel's & Roach's implementation assumes that the source string
is shorter than or equal to the target in length. This patch will
enforce this, both by:

- asserting this condition in `berghel_roach()`, and
- changing `read_corpus` to always sort the two strings
by length before returning them

2024-07-01 Michael Herstine <sp1ff@pobox.com>

Start a CI workflow

Add a test data generation program

Fix broken link in the README

Tidy-up the project.
This patch will fix a few typos, add test data and add a signoff
script.

2021-07-18 Michael Herstine <sp1ff@pobox.com>

Fix issue #2.
Expand Down
33 changes: 26 additions & 7 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
damerau–levenshtein News -- history of user-visible changes -*- outline -*-

* 0.2.1 release
* 0.2

- address https://github.com/sp1ff/damerau-levenshtein/issues/2
* 0.2.0 release
** 0.2.2

- remove the check on C vararrays
- just use flat arrays; do the two-dimensional indexing manually
* 0.1.4 release
*** Bugfixes

- initial release
**** Fix issue 5

Enforce the source string being shorter than or equal to the target in length for
Berghel & Roach.
*** User-visible Changes

**** Add a test-generation program

In `admin/make-dl-test-data`.
** 0.2.1

*** Bugfixes

**** Fix https://github.com/sp1ff/damerau-levenshtein/issues/2
** 0.2.0

*** Bugfixes

**** Remove the check on C vararrays
**** Just use flat arrays; do the two-dimensional indexing manually
* 0.1

** 0.1.4 Initial Release

1 change: 1 addition & 0 deletions admin/make-dl-test-data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist-newstyle
5 changes: 3 additions & 2 deletions test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ EXTRA_DIST = lw-smoke uk-smoke br-smoke lw-br uk-br br-br \
lw-damerau uk-damerau br-damerau \
issue-2 issue-2.txt \
issue-3 issue-3.txt \
test-data-5-6 test-data-5-6.txt
test-data-5-6 test-data-5-6.txt \
test-data-12-8 test-data-12-8.txt
AM_TESTS_ENVIRONMENT= \
srcdir=$(srcdir) \
builddir=$(builddir)
TESTS = lw-smoke uk-smoke br-smoke lw-br uk-br br-br lw-damerau uk-damerau \
br-damerau issue-2 issue-3 test-data-5-6
br-damerau issue-2 issue-3 test-data-5-6 test-data-12-8

timing-tests: check-am FORCE
builddir=$(builddir) srcdir=$(srcdir) ./timing
Expand Down
4 changes: 4 additions & 0 deletions test/test-data-12-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# 100 test cases, generated with `make-dl-test-data`, using `--length=12`
# and `num-edits=8`
${builddir}/../src/dl -a br ${srcdir}/test-data-12-8.txt
100 changes: 100 additions & 0 deletions test/test-data-12-8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
GNWGJJSRNULN GNWGJJRNUN 2
GNWGJJSRNULN HGWGMRNUFAN 7
NWGJJSRNULNZ ENWJJNUNNL 6
WGJJSRNULNZR WJJJSNRLUZNR 4
GJJSRNULNZRF EGJJNLURN 7
JJSRNULNZRFQ EJJRLZNFR 7
JSRNULNZRFQX JJRNULNZRFQNX 2
SRNULNZRFQXH SRNUNZRFQH 2
RNULNZRFQXHE RNULZFRQXE 3
NULNZRFQXHEA NULNZRFQXENA 2
ULNZRFQXHEAA ULNZRQFHXAAEA 4
LNZRFQXHEAAI LNZRFXQEHAAEI 3
LNZRFQXHEAAI LNZRFXQEHAEI 3
LNZRFQXHEAAI LNZRFXQEHAI 3
NZRFQXHEAAIJ NZRFQHXAENIJE 4
ZRFQXHEAAIJM MHZFQXHEAFAAIJM 5
ZRFQXHEAAIJM MH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
EMSNFBXLYTUL EESNFBXLYL 3
MSNFBXLYTULM MSNFBMLYTLTM 3
SNFBXLYTULMY SNFBXYTULYT 3
NFBXLYTULMYC NBXLYTULYMCT 3
FBXLYTULMYCB FXBLYTULMCB 2
2 changes: 2 additions & 0 deletions test/test-data-5-6
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/usr/bin/env bash
# 100 test cases, generated with `make-dl-test-data`, using `--length=5`
# and `num-edits=6`
${builddir}/../src/dl -a br ${srcdir}/test-data-5-6.txt

0 comments on commit 14d5ba2

Please sign in to comment.