Skip to content

Commit

Permalink
fix displacy KeyError: settings bug #6 (#7)
Browse files Browse the repository at this point in the history
[Displacy producing KeyError: 'settings' #3531](explosion/spaCy#3531)
Add `settings = {}` to `Sentence._repr_html_`
  • Loading branch information
beader authored May 28, 2019
1 parent 050039d commit 10616da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data_utils/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _repr_html_(self):
ents.append({'start': ent.start_pos,
'end': ent.end_pos,
'label': ent.category})
ex = {'text': self.text, 'ents': ents, 'title': None}
ex = {'text': self.text, 'ents': ents, 'title': None, 'settings': {}}
return displacy.render(ex,
style='ent',
options={'colors': COLOR_MAP},
Expand Down

0 comments on commit 10616da

Please sign in to comment.