mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-27 02:16:32 +03:00
26446aa728
Move exceptions loading behind a get_tokenizer_exceptions() function for French, instead of loading into the top-level namespace. This cuts import times from 0.6s to 0.2s, at the expense of making the French data a little different from the others (there's no top-level TOKENIZER_EXCEPTIONS variable.) The current solution feels somewhat unsatisfying.
12 lines
266 B
Python
12 lines
266 B
Python
# encoding: utf8
|
|
from __future__ import unicode_literals
|
|
|
|
from .stop_words import STOP_WORDS
|
|
from .tokenizer_exceptions import get_tokenizer_exceptions, TOKEN_MATCH
|
|
|
|
|
|
STOP_WORDS = set(STOP_WORDS)
|
|
|
|
|
|
__all__ = ["STOP_WORDS", "get_tokenizer_exceptions", "TOKEN_MATCH"]
|