From 657849238ffb42092284af370b1bde231d2b1103 Mon Sep 17 00:00:00 2001 From: thjbbvlt Date: Tue, 26 Mar 2024 11:08:49 +0100 Subject: [PATCH] fixed variable types --- spacy/lang/fr/punctuation.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spacy/lang/fr/punctuation.py b/spacy/lang/fr/punctuation.py index f282f2077..89107d202 100644 --- a/spacy/lang/fr/punctuation.py +++ b/spacy/lang/fr/punctuation.py @@ -49,11 +49,10 @@ def upperandtitle(a): return [x for y in [fn(i) for i in a] for x in y] -_suffix_inversion = r"|".join(upperandtitle(_suffix_inversion)) -_prefix_elision = r"|".join(upperandtitle(_prefix_elision)) - -_elision = rf"(?:\b(?:{_prefix_elision})[{ELISION}])" -_inversion = rf"(?:(?<=[^\W\d])[{HYPHENS}]\b(?:{_suffix_inversion})\b)" +_elision = rf"(?:\b(?:{r'|'.join(upperandtitle(_prefix_elision))})[{ELISION}])" +_inversion = ( + rf"(?:(?<=[^\W\d])[{HYPHENS}]\b(?:{r'|'.join(upperandtitle(_suffix_inversion))})\b)" +) TOKENIZER_PREFIXES = [_elision]