def test_issue590(en_vocab):
 doc = get_doc(en_vocab, [u'n', u'=', u'1', u';', u'a', u':', u'5', u'%'])
 matcher = Matcher(en_vocab)
 matcher.add_entity(u'ab', acceptor=None, on_match=None)
 matcher.add_pattern(u'ab', [{IS_ALPHA: True}, {ORTH: u':'}, {LIKE_NUM: True}, {ORTH: u'%'}], label=u'a')
 matcher.add_pattern(u'ab', [{IS_ALPHA: True}, {ORTH: u'='}, {LIKE_NUM: True}], label=u'b')
 matches = matcher(doc)
 assert (len(matches) == 2)

def test_issue590 ( en_vocab ) : doc = get_doc ( en_vocab , [ u'n' , u'=' , u'1' , u';' , u'a' , u':' , u'5' , u'%' ] ) matcher = Matcher ( en_vocab ) matcher . add_entity ( u'ab' , acceptor = None , on_match = None ) matcher . add_pattern ( u'ab' , [ { IS_ALPHA : True } , { ORTH : u':' } , { LIKE_NUM : True } , { ORTH : u'%' } ] , label = u'a' ) matcher . add_pattern ( u'ab' , [ { IS_ALPHA : True } , { ORTH : u'=' } , { LIKE_NUM : True } ] , label = u'b' ) matches = matcher ( doc ) assert ( len ( matches ) == 2 )
test overlapping matches .