Move SpanishDefaults out of Language class, for pickle
@@ -13,10 +13,7 @@ from ...attrs import LANG
from ...util import update_exc
-class Spanish(Language):
- lang = 'es'
-
- class Defaults(Language.Defaults):
+class SpanishDefaults(Language.Defaults):
lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
lex_attr_getters[LANG] = lambda text: 'es'
@@ -29,4 +26,9 @@ class Spanish(Language):
return Lemmatizer(LOOKUP)
+class Spanish(Language):
+ lang = 'es'
+
+ Defaults = SpanishDefaults
+
__all__ = ['Spanish']
