Fix examples

This commit is contained in:
ines 2017-10-27 03:55:04 +02:00
parent 44f83b35bc
commit 4d272e25ee
4 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ they're called on is passed in as the first argument.
Developed for: spaCy 2.0.0a17 Developed for: spaCy 2.0.0a17
Last updated for: spaCy 2.0.0a18 Last updated for: spaCy 2.0.0a18
""" """
from __future__ import unicode_literals from __future__ import unicode_literals, print_function
import plac import plac
from spacy.lang.en import English from spacy.lang.en import English

View File

@ -11,7 +11,7 @@ coordinates. Can be extended with more details from the API.
Developed for: spaCy 2.0.0a17 Developed for: spaCy 2.0.0a17
Last updated for: spaCy 2.0.0a18 Last updated for: spaCy 2.0.0a18
""" """
from __future__ import unicode_literals from __future__ import unicode_literals, print_function
import requests import requests
import plac import plac

View File

@ -11,7 +11,7 @@ respectively.
Developed for: spaCy 2.0.0a17 Developed for: spaCy 2.0.0a17
Last updated for: spaCy 2.0.0a18 Last updated for: spaCy 2.0.0a18
""" """
from __future__ import unicode_literals from __future__ import unicode_literals, print_function
import plac import plac
from spacy.lang.en import English from spacy.lang.en import English

View File

@ -90,7 +90,7 @@ def main(model=None, output_dir=None, n_iter=1000):
nlp.to_disk(output_dir) nlp.to_disk(output_dir)
print("Saved model to", output_dir) print("Saved model to", output_dir)
# test the save model # test the saved model
print("Loading from", output_dir) print("Loading from", output_dir)
nlp2 = spacy.load(output_dir) nlp2 = spacy.load(output_dir)
doc = nlp2(test_text) doc = nlp2(test_text)