Move EnglishDefaults class out of English

This commit is contained in:
Matthew Honnibal 2017-05-20 02:18:19 -05:00
parent a1ba20e2b1
commit 61fe55efba

View File

@ -15,10 +15,7 @@ from ...attrs import LANG
from ...util import update_exc
class English(Language):
lang = 'en'
class Defaults(Language.Defaults):
class EnglishDefaults(Language.Defaults):
lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
lex_attr_getters[LANG] = lambda text: 'en'
lex_attr_getters.update(LEX_ATTRS)
@ -33,4 +30,10 @@ class English(Language):
sytax_iterators = dict(SYNTAX_ITERATORS)
__all__ = ['English']
class English(Language):
lang = 'en'
Defaults = EnglishDefaults
__all__ = ['English', 'EnglishDefaults']