Fix unpickling of NER parser

This commit is contained in:
Matthew Honnibal 2018-05-21 17:42:40 +02:00
parent f3b4f6a4ec
commit ee33de8652

View File

@ -54,15 +54,6 @@ cdef class BiluoPushDown(TransitionSystem):
def __init__(self, *args, **kwargs):
TransitionSystem.__init__(self, *args, **kwargs)
def __reduce__(self):
labels_by_action = OrderedDict()
cdef Transition t
for trans in self.c[:self.n_moves]:
label_str = self.strings[trans.label]
labels_by_action.setdefault(trans.move, []).append(label_str)
return (BiluoPushDown, (self.strings, labels_by_action),
None, None)
@classmethod
def get_actions(cls, **kwargs):
actions = {