mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-28 02:04:07 +03:00
Ensure words are added to vocab before test, so that the lexicon is updated correctly.
This commit is contained in:
parent
75529a9f3b
commit
788657f062
|
@ -10,9 +10,11 @@ def nlp():
|
||||||
data_dir = os.environ.get('SPACY_DATA')
|
data_dir = os.environ.get('SPACY_DATA')
|
||||||
else:
|
else:
|
||||||
data_dir = None
|
data_dir = None
|
||||||
return English(data_dir=data_dir)
|
return English(path=data_dir)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture()
|
@pytest.fixture()
|
||||||
def doc(nlp):
|
def doc(nlp):
|
||||||
|
for word in ['Hello', ',', 'world', '.', 'Here', 'are', 'two', 'sentences', '.']:
|
||||||
|
_ = nlp.vocab[word]
|
||||||
return nlp('Hello, world. Here are two sentences.')
|
return nlp('Hello, world. Here are two sentences.')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user