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