Fix unicode strings in examples [ci skip]

This commit is contained in:
Ines Montani 2019-10-18 18:47:59 +02:00
parent 8d3de90bc4
commit 5e59c9b3ee
2 changed files with 4 additions and 4 deletions

View File

@ -197,7 +197,7 @@ path to the model data directory.
```python
import spacy
nlp = spacy.load("en_core_web_sm")
doc = nlp(u"This is a sentence.")
doc = nlp("This is a sentence.")
```
You can also `import` a model directly via its full name and then call its
@ -208,7 +208,7 @@ import spacy
import en_core_web_sm
nlp = en_core_web_sm.load()
doc = nlp(u"This is a sentence.")
doc = nlp("This is a sentence.")
```
📖 **For more info and examples, check out the

View File

@ -91,8 +91,8 @@ def demo(shape):
nlp = spacy.load("en_vectors_web_lg")
nlp.add_pipe(KerasSimilarityShim.load(nlp.path / "similarity", nlp, shape[0]))
doc1 = nlp(u"The king of France is bald.")
doc2 = nlp(u"France has no king.")
doc1 = nlp("The king of France is bald.")
doc2 = nlp("France has no king.")
print("Sentence 1:", doc1)
print("Sentence 2:", doc2)