minnehwg commited on
Commit
6637157
1 Parent(s): f319a7d

Update util.py

Browse files
Files changed (1) hide show
  1. util.py +2 -2
util.py CHANGED
@@ -109,7 +109,7 @@ def split_into_chunks(text, max_words=800, overlap_sentences=2):
109
 
110
 
111
  def post_processing(text):
112
- sentences = re.split(r'(?<=[.!?])\s*', text)
113
  for i in range(len(sentences)):
114
  if sentences[i]:
115
  sentences[i] = sentences[i][0].upper() + sentences[i][1:]
@@ -118,7 +118,7 @@ def post_processing(text):
118
 
119
 
120
  def display(text):
121
- sentences = re.split(r'(?<=[.!?])\s*', text)
122
  unique_sentences = list(dict.fromkeys(sentences[:-1]))
123
  formatted_sentences = [f"• {sentence}" for sentence in unique_sentences]
124
  return formatted_sentences
 
109
 
110
 
111
  def post_processing(text):
112
+ sentences = re.split(r'(?<=[.!?;])\s*', text)
113
  for i in range(len(sentences)):
114
  if sentences[i]:
115
  sentences[i] = sentences[i][0].upper() + sentences[i][1:]
 
118
 
119
 
120
  def display(text):
121
+ sentences = re.split(r'(?<=[.!?;])\s*', text)
122
  unique_sentences = list(dict.fromkeys(sentences[:-1]))
123
  formatted_sentences = [f"• {sentence}" for sentence in unique_sentences]
124
  return formatted_sentences