This commit is contained in:
Timothy J. Baek committed 2024-06-12 21:18:53 -07:00
1 parent bdd2ac0015
commit d6fd2a8228
8 files changed
+371 -140

No files matched your search

+1 -1
View File
@@ -436,7 +436,7 @@ export const removeEmojis = (str) => {
export const extractSentences = (text) => {
// Split the paragraph into sentences based on common punctuation marks
const sentences = text.split(/(?<=[.!?])/);
const sentences = text.split(/(?<=[.!?])\s+/);
return sentences
.map((sentence) => removeEmojis(sentence.trim()))