mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
Also fix #3387 on develop
This commit is contained in:
parent
c998cde7e2
commit
8dbf1e9037
|
@ -283,7 +283,7 @@ from pathlib import Path
|
|||
nlp = spacy.load("en_core_web_sm")
|
||||
sentences = [u"This is an example.", u"This is another one."]
|
||||
for sent in sentences:
|
||||
doc = nlp(sentence)
|
||||
doc = nlp(sent)
|
||||
svg = displacy.render(doc, style="dep")
|
||||
file_name = '-'.join([w.text for w in doc if not w.is_punct]) + ".svg"
|
||||
output_path = Path("/images/" + file_name)
|
||||
|
|
Loading…
Reference in New Issue
Block a user