Warning: session_start(): open(/var/lib/php/sessions/sess_8tn7tdl8n26bd1gbi5tnb6rrpn, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// post is the text from e.g. https://gazelle.rocks/131422
sS gazelle_ai_addFalseNegativeToDetector(S post) {
S detectorCode = trim(first(splitAtEmptyLines(getColonHeadingSection("Detector code", post))));
print("Detector: " + detectorCode);
LS falseNegatives = lmap afterColon(linesStartingWith("False negative", text);
S falseNegative = random(falseNegatives);
if (falseNegative == null) null;
print("Selecting false negative: " + falseNegative);
S matchExpression = firstQuoted(detectorCode);
print(+matchExpression);
S newMatchExpression = matchExpression + ", " + falseNegative;
print(+newMatchExpression);
S newCode = replace(detectorCode, quote(matchExpression), quote(newMatchExpression));
print(+newCode);
ret newCode;
}