Spaces:
Sleeping
Sleeping
Update src/gradio_app.py
Browse files- src/gradio_app.py +2 -2
src/gradio_app.py
CHANGED
|
@@ -45,7 +45,7 @@ def correct_word(word: str) -> str:
|
|
| 45 |
dic = get_hunspell()
|
| 46 |
|
| 47 |
# Nettoyage: séparer ponctuation
|
| 48 |
-
stripped = word.strip(".,!?;:"'()[]{}«»—–-").lower()
|
| 49 |
if not stripped:
|
| 50 |
return word
|
| 51 |
|
|
@@ -97,7 +97,7 @@ def spellcheck_transcript(text: str, auto_correct: bool = True) -> tuple[str, li
|
|
| 97 |
else:
|
| 98 |
# Mode suggestion seule: on ne corrige pas, on signale juste
|
| 99 |
dic = get_hunspell()
|
| 100 |
-
stripped = word.strip(".,!?;:"'()[]{}«»—–-").lower()
|
| 101 |
corrected = word if (not stripped or dic.lookup(stripped)) else word + " [?]"
|
| 102 |
|
| 103 |
corrected_words.append(corrected)
|
|
|
|
| 45 |
dic = get_hunspell()
|
| 46 |
|
| 47 |
# Nettoyage: séparer ponctuation
|
| 48 |
+
stripped = word.strip(".,!?;:\"'()[]{}«»—–-").lower()
|
| 49 |
if not stripped:
|
| 50 |
return word
|
| 51 |
|
|
|
|
| 97 |
else:
|
| 98 |
# Mode suggestion seule: on ne corrige pas, on signale juste
|
| 99 |
dic = get_hunspell()
|
| 100 |
+
stripped = word.strip(".,!?;:\"'()[]{}«»—–-").lower()
|
| 101 |
corrected = word if (not stripped or dic.lookup(stripped)) else word + " [?]"
|
| 102 |
|
| 103 |
corrected_words.append(corrected)
|