2019-08-05 08:22:27 +00:00
|
|
|
from .stop_words import STOP_WORDS
|
2019-08-22 09:43:07 +00:00
|
|
|
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
|
|
|
|
from .lex_attrs import LEX_ATTRS
|
2019-08-05 08:22:27 +00:00
|
|
|
from ..tokenizer_exceptions import BASE_EXCEPTIONS
|
|
|
|
from ...language import Language
|
2020-05-19 13:59:14 +00:00
|
|
|
from ...attrs import LANG
|
|
|
|
from ...util import update_exc
|
2019-08-05 08:22:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
class SerbianDefaults(Language.Defaults):
|
|
|
|
lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
|
2019-08-22 09:43:07 +00:00
|
|
|
lex_attr_getters.update(LEX_ATTRS)
|
2019-08-21 17:57:37 +00:00
|
|
|
lex_attr_getters[LANG] = lambda text: "sr"
|
2019-08-22 09:43:07 +00:00
|
|
|
tokenizer_exceptions = update_exc(BASE_EXCEPTIONS, TOKENIZER_EXCEPTIONS)
|
2019-08-05 08:22:27 +00:00
|
|
|
stop_words = STOP_WORDS
|
|
|
|
|
|
|
|
|
|
|
|
class Serbian(Language):
|
2019-08-21 17:57:37 +00:00
|
|
|
lang = "sr"
|
2019-08-05 08:22:27 +00:00
|
|
|
Defaults = SerbianDefaults
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = ["Serbian"]
|