* Fix bug in ugly ent_strings hack on English class

This commit is contained in:
Matthew Honnibal 2015-03-11 02:26:40 -04:00
parent 1c843934be
commit f21ab2d7fb
1 changed files with 2 additions and 1 deletions

View File

@ -184,7 +184,8 @@ class English(object):
self.entity(tokens)
ent_strings = [None] * (max(self.entity.moves.label_ids.values()) + 1)
for label, i in self.entity.moves.label_ids.items():
ent_strings[i] = label
if i >= 0:
ent_strings[i] = label
tokens._ent_strings = tuple(ent_strings)
return tokens