mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 00:46:28 +03:00
issue5230 changed reference to function to anonymous function
This commit is contained in:
parent
cef0c909b9
commit
a3401b1194
|
@ -625,7 +625,7 @@ class Tagger(Pipe):
|
|||
serialize = OrderedDict((
|
||||
("vocab", lambda p: self.vocab.to_disk(p)),
|
||||
("tag_map", lambda p: srsly.write_msgpack(p, tag_map)),
|
||||
("model", self.model.to_disk),
|
||||
("model", lambda p: self.model.to_disk(p)),
|
||||
("cfg", lambda p: srsly.write_json(p, self.cfg))
|
||||
))
|
||||
exclude = util.get_serialization_exclude(serialize, exclude, kwargs)
|
||||
|
@ -1394,7 +1394,7 @@ class EntityLinker(Pipe):
|
|||
serialize["vocab"] = lambda p: self.vocab.to_disk(p)
|
||||
serialize["kb"] = lambda p: self.kb.dump(p)
|
||||
if self.model not in (None, True, False):
|
||||
serialize["model"] = self.model.to_disk
|
||||
serialize["model"] = lambda p: self.model.to_disk(p)
|
||||
exclude = util.get_serialization_exclude(serialize, exclude, kwargs)
|
||||
util.to_disk(path, serialize, exclude)
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@ cdef class Vectors:
|
|||
save_array(self.data, _file)
|
||||
|
||||
serializers = OrderedDict((
|
||||
("vectors", save_vectors),
|
||||
("vectors", lambda p: save_vectors(p)),
|
||||
("key2row", lambda p: srsly.write_msgpack(p, self.key2row))
|
||||
))
|
||||
return util.to_disk(path, serializers, [])
|
||||
|
|
Loading…
Reference in New Issue
Block a user