@pytest.mark.models
def test_issue587(EN):
 matcher = Matcher(EN.vocab)
 content = u'a b; c'
 matcher.add(entity_key=u'1', label=u'TEST', attrs={}, specs=[[{ORTH: u'a'}, {ORTH: u'b'}]])
 matcher(EN(content))
 matcher.add(entity_key=u'2', label=u'TEST', attrs={}, specs=[[{ORTH: u'a'}, {ORTH: u'b'}, {IS_PUNCT: True}, {ORTH: u'c'}]])
 matcher(EN(content))
 matcher.add(entity_key=u'3', label=u'TEST', attrs={}, specs=[[{ORTH: u'a'}, {ORTH: u'b'}, {IS_PUNCT: True}, {ORTH: u'd'}]])
 matcher(EN(content))

@ pytest . mark . models def test_issue587 ( EN ) : matcher = Matcher ( EN . vocab ) content = u'a b; c' matcher . add ( entity_key = u'1' , label = u'TEST' , attrs = { } , specs = [ [ { ORTH : u'a' } , { ORTH : u'b' } ] ] ) matcher ( EN ( content ) ) matcher . add ( entity_key = u'2' , label = u'TEST' , attrs = { } , specs = [ [ { ORTH : u'a' } , { ORTH : u'b' } , { IS_PUNCT : True } , { ORTH : u'c' } ] ] ) matcher ( EN ( content ) ) matcher . add ( entity_key = u'3' , label = u'TEST' , attrs = { } , specs = [ [ { ORTH : u'a' } , { ORTH : u'b' } , { IS_PUNCT : True } , { ORTH : u'd' } ] ] ) matcher ( EN ( content ) )
test that matcher doesnt segfault on particular input .