adhim
commited on
Commit
·
00bd99e
1
Parent(s):
e0c803a
bracket for add_space_before_punctuation() added
Browse files
app.py
CHANGED
|
@@ -399,6 +399,9 @@ def add_space_before_punctuation(text):
|
|
| 399 |
# Use re.sub to add a space before each punctuation
|
| 400 |
modified_text = re.sub(punctuation_pattern, r" \1", text)
|
| 401 |
|
|
|
|
|
|
|
|
|
|
| 402 |
return modified_text
|
| 403 |
|
| 404 |
|
|
|
|
| 399 |
# Use re.sub to add a space before each punctuation
|
| 400 |
modified_text = re.sub(punctuation_pattern, r" \1", text)
|
| 401 |
|
| 402 |
+
bracket_pattern = r'([()])'
|
| 403 |
+
modified_text = re.sub(bracket_pattern, r" \1 ", modified_text)
|
| 404 |
+
|
| 405 |
return modified_text
|
| 406 |
|
| 407 |
|