Small change to splitting of text

This commit is contained in:
erew123 authored and GitHub committed 2024-04-28 21:14:25 +01:00
1 parent eb08d31509
commit a3f157249c
1 file changed
+2 -1
+2 -1
View File
@@ -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.");