mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-03 21:24:11 +03:00
Fix matcher test
This commit is contained in:
parent
9efda9e9ab
commit
6d7986b0f1
|
@ -1,7 +1,8 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from ..matcher import Matcher, PhraseMatcher
|
||||
from ..matcher2 import Matcher
|
||||
from ..matcher2 import PhraseMatcher
|
||||
from .util import get_doc
|
||||
from ..tokens import Doc
|
||||
|
||||
|
@ -186,6 +187,7 @@ def test_matcher_match_zero_plus(matcher):
|
|||
pattern = [{'ORTH': '"'},
|
||||
{'OP': '*', 'IS_PUNCT': False},
|
||||
{'ORTH': '"'}]
|
||||
matcher = Matcher(matcher.vocab)
|
||||
matcher.add('Quote', None, pattern)
|
||||
doc = get_doc(matcher.vocab, words)
|
||||
assert len(matcher(doc)) == 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user