mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-29 17:33:10 +03:00
* Fix first code example on the website
This commit is contained in:
parent
af332f5095
commit
2c8dd91785
|
@ -9,15 +9,10 @@ def token(doc):
|
||||||
return doc[0]
|
return doc[0]
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.models
|
||||||
def test_load_resources_and_process_text():
|
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
|
from spacy.en import English
|
||||||
nlp = English(data_dir=data_dir)
|
nlp = English()
|
||||||
doc = nlp('Hello, world. Here are two sentences.')
|
doc = nlp('Hello, world. Here are two sentences.')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user