mirror of https://github.com/explosion/spaCy.git
Move EnglishDefaults class out of English
This commit is contained in:
parent
a1ba20e2b1
commit
61fe55efba
|
@ -15,10 +15,7 @@ from ...attrs import LANG
|
||||||
from ...util import update_exc
|
from ...util import update_exc
|
||||||
|
|
||||||
|
|
||||||
class English(Language):
|
class EnglishDefaults(Language.Defaults):
|
||||||
lang = 'en'
|
|
||||||
|
|
||||||
class Defaults(Language.Defaults):
|
|
||||||
lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
|
lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
|
||||||
lex_attr_getters[LANG] = lambda text: 'en'
|
lex_attr_getters[LANG] = lambda text: 'en'
|
||||||
lex_attr_getters.update(LEX_ATTRS)
|
lex_attr_getters.update(LEX_ATTRS)
|
||||||
|
@ -33,4 +30,10 @@ class English(Language):
|
||||||
sytax_iterators = dict(SYNTAX_ITERATORS)
|
sytax_iterators = dict(SYNTAX_ITERATORS)
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['English']
|
class English(Language):
|
||||||
|
lang = 'en'
|
||||||
|
|
||||||
|
Defaults = EnglishDefaults
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['English', 'EnglishDefaults']
|
||||||
|
|
Loading…
Reference in New Issue