Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -400,6 +400,9 @@ def correct_dash_usage(text):
|
|
400 |
# Step 3: Replace any dash with hyphen if surrounded by letters or a combination of letters and digits
|
401 |
text = re.sub(r'(?<=[a-zA-Zа-яА-Я0-9])[-–—](?=[a-zA-Zа-яА-Я0-9])', '-', text)
|
402 |
|
|
|
|
|
|
|
403 |
return text
|
404 |
|
405 |
|
|
|
400 |
# Step 3: Replace any dash with hyphen if surrounded by letters or a combination of letters and digits
|
401 |
text = re.sub(r'(?<=[a-zA-Zа-яА-Я0-9])[-–—](?=[a-zA-Zа-яА-Я0-9])', '-', text)
|
402 |
|
403 |
+
# Кавычки "лапки" (они же "птички") тут же до кучи заменим на кавычки-елочки («...»)
|
404 |
+
text = re.sub(r'"([^\"]+)"', r'«\1»', text)
|
405 |
+
|
406 |
return text
|
407 |
|
408 |
|