spaCy/spacy/lang/da/__init__.py

34 lines
766 B
Python
Raw Normal View History

2017-05-10 22:15:12 +03:00
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .punctuation import TOKENIZER_INFIXES, TOKENIZER_SUFFIXES
2017-05-10 22:15:12 +03:00
from .stop_words import STOP_WORDS
2017-07-03 16:45:31 +03:00
from .lex_attrs import LEX_ATTRS
2017-05-10 22:15:12 +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"]
"""
2017-05-10 22:15:12 +03:00
class DanishDefaults(Language.Defaults):
2020-09-30 11:20:14 +03:00
config = load_config_from_str(DEFAULT_CONFIG)
tokenizer_exceptions = TOKENIZER_EXCEPTIONS
infixes = TOKENIZER_INFIXES
suffixes = TOKENIZER_SUFFIXES
lex_attr_getters = LEX_ATTRS
stop_words = STOP_WORDS
2017-05-10 22:15:12 +03:00
class Danish(Language):
lang = "da"
Defaults = DanishDefaults
2017-05-10 22:15:12 +03:00
__all__ = ["Danish"]