Spaces:
Sleeping
Sleeping
SitwalaM
commited on
Commit
·
b9069b0
1
Parent(s):
c649b24
added extra fix
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import re
|
|
| 3 |
|
| 4 |
def clean_text(text):
|
| 5 |
# Replace hyphen followed by space or multiple spaces with just a hyphen
|
|
|
|
| 6 |
text = re.sub(r'-\s+', '-', text)
|
| 7 |
return text
|
| 8 |
|
|
|
|
| 3 |
|
| 4 |
def clean_text(text):
|
| 5 |
# Replace hyphen followed by space or multiple spaces with just a hyphen
|
| 6 |
+
text = re.sub(r'-(?=\w)', '', text)
|
| 7 |
text = re.sub(r'-\s+', '-', text)
|
| 8 |
return text
|
| 9 |
|