mirror of
https://github.com/explosion/spaCy.git
synced 2025-03-03 10:55:52 +03:00
Add test for Issue #758
Issue #758 occurs when no actions are available for a single token doc after merging.
This commit is contained in:
parent
47a3ef06a6
commit
e854f28304
17
spacy/tests/regression/test_issue758.py
Normal file
17
spacy/tests/regression/test_issue758.py
Normal file
|
@ -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')
|
Loading…
Reference in New Issue
Block a user