Small change to splitting of text
This commit is contained in:
1 parent
eb08d31509
commit
a3f157249c
1 file changed
+2
-1
@@ -935,7 +935,8 @@
|
||||
// (?<=[.!?:])\s+ instead of
|
||||
// (?<=\[.!?:\])\\s+
|
||||
// so I don't know whats going on here
|
||||
let sentences = cleanedText.split(/(?<=[\[.!?:\]])\s+|(?<=[\u3002\uFF01\uFF1A\uFF1F])/);
|
||||
// let sentences = cleanedText.split(/(?<=[\[.!?:\]])\s+|(?<=[\u3002\uFF01\uFF1A\uFF1F])/);
|
||||
let sentences = cleanedText.split(/(?<=[\[.!?:\]]['"\u2018\u2019\u201C\u201D]*)\s+|(?<=[\u3002\uFF01\uFF1A\uFF1F])/);
|
||||
|
||||
if (!sentences) {
|
||||
console.error("No sentences found in the input text.");
|
||||
|
||||
Reference in new issue
Block a user