From 9e9a64e6ba77e2ee4230d392644ee35435896987 Mon Sep 17 00:00:00 2001 From: Alec Date: Tue, 12 Nov 2024 23:12:30 -0500 Subject: [PATCH] more accurate character replacement for wordcloud words, tested with other languages --- modules/utilities.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/utilities.js b/modules/utilities.js index afbcd63..e2e1982 100644 --- a/modules/utilities.js +++ b/modules/utilities.js @@ -98,6 +98,7 @@ module.exports = { const wordsWithOccurrences = []; for (const quote of quotesForCloud) { const words = quote.quotation + .replace(/[^\p{L}0-9'’\/-]/gu, ' ') .split(' ') .filter((word) => word.length > 0 && !STOP_WORDS.includes(word.toLowerCase())); for (const word of words) {