fruitpicker01 commited on
Commit
fe45431
·
verified ·
1 Parent(s): eb622a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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