mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Fix pickling of Japanese (closes #3191)
This commit is contained in:
parent
c399162a82
commit
ef80cfde6f
|
@ -9,6 +9,7 @@ from .tag_map import TAG_MAP
|
||||||
from ...attrs import LANG
|
from ...attrs import LANG
|
||||||
from ...language import Language
|
from ...language import Language
|
||||||
from ...tokens import Doc, Token
|
from ...tokens import Doc, Token
|
||||||
|
from ...compat import copy_reg
|
||||||
from ...util import DummyTokenizer
|
from ...util import DummyTokenizer
|
||||||
|
|
||||||
|
|
||||||
|
@ -107,4 +108,11 @@ class Japanese(Language):
|
||||||
return self.tokenizer(text)
|
return self.tokenizer(text)
|
||||||
|
|
||||||
|
|
||||||
|
def pickle_japanese(instance):
|
||||||
|
return Japanese, tuple()
|
||||||
|
|
||||||
|
|
||||||
|
copy_reg.pickle(Japanese, pickle_japanese)
|
||||||
|
|
||||||
|
|
||||||
__all__ = ["Japanese"]
|
__all__ = ["Japanese"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user