* Fix first code example on the website

This commit is contained in:
Matthew Honnibal 2016-01-23 18:08:56 +01:00
parent af332f5095
commit 2c8dd91785

View File

@ -9,15 +9,10 @@ def token(doc):
return doc[0]
@pytest.mark.models
def test_load_resources_and_process_text():
if os.environ.get('SPACY_DATA'):
data_dir = os.environ.get('SPACY_DATA')
else:
data_dir = None
print("Load EN from %s" % data_dir)
from spacy.en import English
nlp = English(data_dir=data_dir)
nlp = English()
doc = nlp('Hello, world. Here are two sentences.')