Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comprehensive french tokenizer without exceptions list #13378

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
10 changes: 7 additions & 3 deletions spacy/lang/fr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
from .punctuation import TOKENIZER_INFIXES, TOKENIZER_PREFIXES, TOKENIZER_SUFFIXES
from .stop_words import STOP_WORDS
from .syntax_iterators import SYNTAX_ITERATORS
from .tokenizer_exceptions import TOKEN_MATCH, TOKENIZER_EXCEPTIONS
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS


class FrenchDefaults(BaseDefaults):
tokenizer_exceptions = TOKENIZER_EXCEPTIONS
prefixes = TOKENIZER_PREFIXES
infixes = TOKENIZER_INFIXES
suffixes = TOKENIZER_SUFFIXES
token_match = TOKEN_MATCH
lex_attr_getters = LEX_ATTRS
syntax_iterators = SYNTAX_ITERATORS
stop_words = STOP_WORDS
Expand Down Expand Up @@ -47,7 +46,12 @@ def make_lemmatizer(
scorer: Optional[Callable],
):
return FrenchLemmatizer(
nlp.vocab, model, name, mode=mode, overwrite=overwrite, scorer=scorer
nlp.vocab,
model,
name,
mode=mode,
overwrite=overwrite,
scorer=scorer,
)


Expand Down