[ENH] Add ability to bulk create sets

This commit is contained in:
2022-08-30 00:14:43 +01:00
parent 58aef9e2b3
commit 48bb19c532
9 changed files with 466 additions and 5 deletions

View File

@@ -430,7 +430,7 @@ exports.createProgressWithIncorrect = functions.https.onCall((data, context) =>
* @return {string} The original string with the unwanted characters removed.
*/
function cleanseVocabString(item, ignoreCaps=false, ignoreAccents=false) {
const chars = /[\p{P}\p{S} ]+/ug;
const chars = /[\p{P}\p{S}\n ]+/ug;
let cleansed = item.replace(chars, "");
if (ignoreAccents) cleansed = cleansed.normalize('NFD').replace(/\p{Diacritic}/gu, "");
if (ignoreCaps) {