spaCy/spacy/lang/id/__init__.py

37 lines
923 B
Python
Raw Normal View History

2017-07-23 16:51:31 +03:00
from .stop_words import STOP_WORDS
2017-07-24 02:17:07 +03:00
from .punctuation import TOKENIZER_SUFFIXES, TOKENIZER_PREFIXES, TOKENIZER_INFIXES
2017-08-20 09:43:21 +03:00
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
2017-07-23 16:51:31 +03:00
from .lex_attrs import LEX_ATTRS
from .syntax_iterators import SYNTAX_ITERATORS
2017-07-23 17:30:34 +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-07-23 16:51:31 +03:00
class IndonesianDefaults(Language.Defaults):
2020-09-30 11:20:14 +03:00
config = load_config_from_str(DEFAULT_CONFIG)
tokenizer_exceptions = TOKENIZER_EXCEPTIONS
prefixes = TOKENIZER_PREFIXES
suffixes = TOKENIZER_SUFFIXES
infixes = TOKENIZER_INFIXES
syntax_iterators = SYNTAX_ITERATORS
lex_attr_getters = LEX_ATTRS
stop_words = STOP_WORDS
2017-07-23 16:51:31 +03:00
class Indonesian(Language):
lang = "id"
2017-07-23 16:51:31 +03:00
Defaults = IndonesianDefaults
__all__ = ["Indonesian"]