Skip to content

Commit 3ff3764

Browse files
committed
update windowdiff tests
1 parent 1c78246 commit 3ff3764

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

nltk/test/segmentation.doctest

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@ Windowdiff
2222

2323
Compute the windowdiff score for a pair of segmentations.
2424

25-
>>> s1 = "00000010000000001000000"
26-
>>> s2 = "00000001000000010000000"
27-
>>> s3 = "00010000000000000001000"
25+
>>> s1 = "000100000010"
26+
>>> s2 = "000010000100"
27+
>>> s3 = "100000010000"
2828
>>> windowdiff(s1, s1, 3)
29-
0
29+
0.0
3030
>>> windowdiff(s1, s2, 3)
31-
4
31+
0.3
3232
>>> windowdiff(s2, s3, 3)
33-
16
34-
33+
0.8
3534

3635
----------------------------
3736
Generalized Hamming Distance

0 commit comments

Comments
 (0)