Skip to content

Commit

Permalink
Add test for Issue #758
Browse files Browse the repository at this point in the history
Issue #758 occurs when no actions are available for a single token
doc after merging.
  • Loading branch information
honnibal committed Mar 31, 2017
1 parent 47a3ef0 commit e854f28
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spacy/tests/regression/test_issue758.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from ... import load as load_spacy
from ...attrs import LEMMA
from ...matcher import merge_phrase

import pytest




@pytest.mark.models
def test_issue758():
'''Test parser transition bug after label added.'''
nlp = load_spacy('en')
nlp.matcher.add('splash', 'my_entity', {},
[[{LEMMA: 'splash'}, {LEMMA: 'on'}]],
on_match=merge_phrase)
doc = nlp('splash On')

0 comments on commit e854f28

Please sign in to comment.