mirror of https://github.com/explosion/spaCy.git
Fix unpickling of NER parser
This commit is contained in:
parent
f3b4f6a4ec
commit
ee33de8652
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue