2019-08-05 11:22:27 +03:00
|
|
|
from .stop_words import STOP_WORDS
|
2019-08-22 12:43:07 +03:00
|
|
|
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
|
|
|
|
from .lex_attrs import LEX_ATTRS
|
2019-08-05 11:22:27 +03:00
|
|
|
from ...language import Language
|
2020-09-30 11:20:14 +03:00
|
|
|
from ...util import load_config_from_str
|
|
|
|
|
|
|
|
|
|
|
|
DEFAULT_CONFIG = """
|
|
|
|
[initialize]
|
|
|
|
|
|
|
|
[initialize.lookups]
|
|
|
|
@misc = "spacy.LookupsDataLoader.v1"
|
|
|
|
lang = ${nlp.lang}
|
|
|
|
tables = ["lexeme_norm"]
|
|
|
|
"""
|
2019-08-05 11:22:27 +03:00
|
|
|
|
|
|
|
|
|
|
|
class SerbianDefaults(Language.Defaults):
|
2020-09-30 11:20:14 +03:00
|
|
|
config = load_config_from_str(DEFAULT_CONFIG)
|
2020-07-22 23:18:46 +03:00
|
|
|
tokenizer_exceptions = TOKENIZER_EXCEPTIONS
|
2020-07-24 15:50:26 +03:00
|
|
|
lex_attr_getters = LEX_ATTRS
|
|
|
|
stop_words = STOP_WORDS
|
2019-08-05 11:22:27 +03:00
|
|
|
|
|
|
|
|
|
|
|
class Serbian(Language):
|
2019-08-21 20:57:37 +03:00
|
|
|
lang = "sr"
|
2019-08-05 11:22:27 +03:00
|
|
|
Defaults = SerbianDefaults
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = ["Serbian"]
|