terminal out
This commit is contained in:
+8
-3
@@ -22,7 +22,9 @@ def fragments(utterance: str):
|
||||
frags = []
|
||||
sentences = utterance.splitlines()
|
||||
|
||||
PUNCT_RE = regex.compile(r'(\p{Punctuation})')
|
||||
PUNCT_RE = regex.compile(r'(\p{Punctuation})')
|
||||
|
||||
skip_punctuation = ["'"]
|
||||
|
||||
for s in sentences:
|
||||
sf = PUNCT_RE.split(s)
|
||||
@@ -36,8 +38,11 @@ def fragments(utterance: str):
|
||||
cum += k
|
||||
else:
|
||||
cum += k
|
||||
frags.append(cum)
|
||||
cum = ""
|
||||
if k in skip_punctuation:
|
||||
continue
|
||||
else:
|
||||
frags.append(cum)
|
||||
cum = ""
|
||||
cum += '\n'
|
||||
frags.append(cum)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user