mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
174e85439b
* Add failing test for matcher bug #3009 * Deduplicate matches from Matcher * Update matcher ? quantifier test * Fix bug with ? quantifier in Matcher The ? quantifier indicates a token may occur zero or one times. If the token pattern fit, the matcher would fail to consider valid matches where the token pattern did not fit. Consider a simple regex like: .?b If we have the string 'b', the .? part will fit --- but then the 'b' in the pattern will not fit, leaving us with no match. The same bug left us with too few matches in some cases. For instance, consider: .?.? If we have a string of length two, like 'ab', we actually have three possible matches here: [a, b, ab]. We were only recovering 'ab'. This should now be fixed. Note that the fix also uncovered another bug, where we weren't deduplicating the matches. There are actually two ways we might match 'a' and two ways we might match 'b': as the second token of the pattern, or as the first token of the pattern. This ambiguity is spurious, so we need to deduplicate. Closes #2464 and #3009 * Fix Python2 |
||
---|---|---|
.. | ||
__init__.py | ||
_test_issue1622.py | ||
_test_issue2800.py | ||
test_issue1-1000.py | ||
test_issue1001-1500.py | ||
test_issue1501-2000.py | ||
test_issue2001-2500.py | ||
test_issue2564.py | ||
test_issue2569.py | ||
test_issue2626.py | ||
test_issue2671.py | ||
test_issue2754.py | ||
test_issue2772.py | ||
test_issue2782.py | ||
test_issue2871.py | ||
test_issue2901.py | ||
test_issue3009.py | ||
test_issue3012.py |