mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
20 lines
413 B
Python
20 lines
413 B
Python
# 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
|