Also fix #3387 on develop

This commit is contained in:
Ines Montani 2019-03-10 23:36:28 +01:00
parent c998cde7e2
commit 8dbf1e9037

View File

@ -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)