spaCy/spacy/lang/ky/__init__.py

32 lines
798 B
Python
Raw Normal View History

2021-01-22 20:08:41 +03:00
# coding: utf8
from __future__ import unicode_literals
from .lex_attrs import LEX_ATTRS
from .punctuation import TOKENIZER_INFIXES
from .stop_words import STOP_WORDS
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ...attrs import LANG
from ...language import Language
from ...util import update_exc
2021-01-23 19:00:50 +03:00
class KyrgyzDefaults(Language.Defaults):
2021-01-22 20:08:41 +03:00
lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
2021-01-23 19:00:50 +03:00
lex_attr_getters[LANG] = lambda text: "ky"
2021-01-22 20:08:41 +03:00
lex_attr_getters.update(LEX_ATTRS)
tokenizer_exceptions = update_exc(BASE_EXCEPTIONS, TOKENIZER_EXCEPTIONS)
infixes = tuple(TOKENIZER_INFIXES)
stop_words = STOP_WORDS
2021-01-23 19:00:50 +03:00
class Kyrgyz(Language):
lang = "ky"
Defaults = KyrgyzDefaults
2021-01-22 20:08:41 +03:00
2021-01-23 19:00:50 +03:00
__all__ = ["Kyrgyz"]