spaCy/spacy/fr/language_data.py
Matthew Honnibal 26446aa728 Avoid loading all French exceptions on import
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.
2017-02-25 11:55:00 +01:00

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"]