added tests for issue #1915

This commit is contained in:
Motoki Wu 2018-01-30 18:30:19 -08:00
parent f4a7d1a423
commit 54062b7326
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
# coding: utf8
from __future__ import unicode_literals
from ...language import Language
def test_simple_ner():
cfg = {
'hidden_depth': 2, # should error out
}
nlp = Language()
nlp.add_pipe(nlp.create_pipe('ner'))
nlp.get_pipe('ner').add_label('answer')
try:
nlp.begin_training(**cfg)
assert False # should error out
except ValueError:
assert True