!7 sclass Entry { long msgID; S originalLine; S groupedText; sS _fieldOrder = "msgID originalLine groupedText"; } set flag DynModule. cmodule GroupedChatLines > DynObjectTable { start { addCountToName(); thread { scan(); } } visualize { ret withCenteredButtons(super.visualize(), "Scan", rThread scan); } void scan enter { new L list; new Flag interrupted; temp AutoCloseable action = dm_currentAction("Scanning chat", rRaiseFlag(interrupted)); L lines = dm_discord_allLines(); int i = 0; for (GazelleLine line : reversed(lines)) { ++i; if (!licensed() || interrupted!) break; S input = trim(line.text); if (empty(input)) continue; S groupedText = gazelle_groupPhrases(input); if (neq(groupedText, input)) list.add(nu Entry( originalLine := input, msgID := line.msgID, +groupedText)); call(action, 'setText, "Found " + n2(list, "grouping") + ", scanned " + i + "/" + n2(lines, "line")); } setList(list); } }