Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
robustness-gym
/
summvis
like
0
Runtime error
App
Files
Files
Community
68e5edd
summvis
/
utils.py
cbensimon
HF staff
Initial commit
6124176
unverified
about 3 years ago
raw
history
blame
No virus
153 Bytes
import
re
def
preprocess_text
(
text
):
split_punct = re.escape(
r'()'
)
return
' '
.join(re.findall(
rf"[^\s
{split_punct}
]+|[
{split_punct}
]"
, text))