spaCy/spacy/lang/id/__init__.py

30 lines
737 B
Python
Raw Normal View History

2017-07-23 16:51:31 +03:00
# coding: utf8
from __future__ import unicode_literals
from .stop_words import STOP_WORDS
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .lex_attrs import LEX_ATTRS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
2017-07-23 17:30:34 +03:00
from ...language import Language
from ...attrs import LANG
from ...util import update_exc
2017-07-23 16:51:31 +03:00
class IndonesianDefaults(Language.Defaults):
lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
lex_attr_getters[LANG] = lambda text: 'id'
lex_attr_getters.update(LEX_ATTRS)
2017-07-23 17:30:34 +03:00
tokenizer_exceptions = update_exc(BASE_EXCEPTIONS, TOKENIZER_EXCEPTIONS)
2017-07-23 16:51:31 +03:00
stop_words = set(STOP_WORDS)
class Indonesian(Language):
lang = 'id'
Defaults = IndonesianDefaults
__all__ = ['Indonesian']