Spaces:
Sleeping
Sleeping
change reg
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def split_into_sentences(text):
|
|
9 |
Simple sentence tokenizer using regular expressions.
|
10 |
Splits text into sentences based on punctuation.
|
11 |
"""
|
12 |
-
sentences = re.split(r'(?<=[.!?])\s
|
13 |
sentences = [s.strip() for s in sentences if s.strip()]
|
14 |
return sentences
|
15 |
|
|
|
9 |
Simple sentence tokenizer using regular expressions.
|
10 |
Splits text into sentences based on punctuation.
|
11 |
"""
|
12 |
+
sentences = re.split(r'(?<=[.!?])\s+', text)
|
13 |
sentences = [s.strip() for s in sentences if s.strip()]
|
14 |
return sentences
|
15 |
|