mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-06 05:10:21 +03:00
Format tests
This commit is contained in:
parent
0d344169af
commit
a6cf58f64e
|
@ -813,11 +813,11 @@ def test_matcher_non_greedy_operator(en_vocab):
|
||||||
(7, "aabbab", "a*? b*", ["a a b", "a b", "b", "a a b b", "a b b", "b b", "b", "a b", "b"]),
|
(7, "aabbab", "a*? b*", ["a a b", "a b", "b", "a a b b", "a b b", "b b", "b", "a b", "b"]),
|
||||||
(8, "aabbc", "a* b*? c*?", ["a", "a a", "a"]),
|
(8, "aabbc", "a* b*? c*?", ["a", "a a", "a"]),
|
||||||
(9, "aabbc", "a* b*? c", ["a a b b c", "a b b c", "b b c", "b c", "c"]),
|
(9, "aabbc", "a* b*? c", ["a a b b c", "a b b c", "b b c", "b c", "c"]),
|
||||||
|
|
||||||
(10, "abc", "a* b*? c*", ["a", "a b c", "b c", "c"]),
|
(10, "abc", "a* b*? c*", ["a", "a b c", "b c", "c"]),
|
||||||
# in spaCy, quantifier "*" returns __all__possible__ matches which is
|
# in spaCy, quantifier "*" returns __all__possible__ matches which is
|
||||||
# different from regex
|
# different from regex
|
||||||
# quantifier "*?" is designed to return only the non-greedy results from # all possible matches
|
# quantifier "*?" is designed to return only the non-greedy results from
|
||||||
|
# all possible matches
|
||||||
# Result 1: a
|
# Result 1: a
|
||||||
# Result 2: a b c
|
# Result 2: a b c
|
||||||
# Result 3: c
|
# Result 3: c
|
||||||
|
|
Loading…
Reference in New Issue
Block a user