2019-02-14 17:31:19 +03:00
|
|
|
from .stop_words import STOP_WORDS
|
2021-02-19 21:19:19 +03:00
|
|
|
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
|
|
|
|
from .lex_attrs import LEX_ATTRS
|
|
|
|
from ..tokenizer_exceptions import BASE_EXCEPTIONS
|
|
|
|
|
2019-02-14 17:31:19 +03:00
|
|
|
from ...language import Language
|
2021-02-19 21:19:19 +03:00
|
|
|
from ...attrs import LANG
|
|
|
|
from ...util import update_exc
|
2019-02-14 17:31:19 +03:00
|
|
|
|
|
|
|
|
2020-07-24 15:50:26 +03:00
|
|
|
class BulgarianDefaults(Language.Defaults):
|
2021-02-19 21:19:19 +03:00
|
|
|
lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
|
|
|
|
lex_attr_getters[LANG] = lambda text: "bg"
|
|
|
|
|
|
|
|
lex_attr_getters.update(LEX_ATTRS)
|
|
|
|
|
2020-07-24 15:50:26 +03:00
|
|
|
stop_words = STOP_WORDS
|
2021-02-19 21:19:19 +03:00
|
|
|
tokenizer_exceptions = update_exc(BASE_EXCEPTIONS, TOKENIZER_EXCEPTIONS)
|
2019-02-14 17:31:19 +03:00
|
|
|
|
|
|
|
|
|
|
|
class Bulgarian(Language):
|
|
|
|
lang = "bg"
|
2020-07-24 15:50:26 +03:00
|
|
|
Defaults = BulgarianDefaults
|
2019-02-14 17:31:19 +03:00
|
|
|
|
|
|
|
|
|
|
|
__all__ = ["Bulgarian"]
|