Sprint 32: end-of-sprint architecture refactor pass

This commit is contained in:
Bill
2026-02-17 11:16:39 -07:00
parent 7384660e31
commit 7de00387cc
5 changed files with 97 additions and 57 deletions

View File

@@ -1,9 +1,9 @@
#pragma once
// Step 575: Requirement Normalization and Conflict Detection
#include "IntakeTextUtil.h"
#include "MarkdownSpecParser.h"
#include <algorithm>
#include <cctype>
#include <map>
#include <set>
@@ -81,20 +81,7 @@ private:
}
static std::string normalizeText(const std::string& text) {
std::string out;
bool lastSpace = false;
for (char c : text) {
if (std::isalnum(static_cast<unsigned char>(c))) {
out.push_back(static_cast<char>(std::tolower(static_cast<unsigned char>(c))));
lastSpace = false;
} else {
if (!lastSpace) out.push_back(' ');
lastSpace = true;
}
}
while (!out.empty() && out.front() == ' ') out.erase(out.begin());
while (!out.empty() && out.back() == ' ') out.pop_back();
return out;
return intakeCompactLowerAlnumSpaces(text);
}
static bool isAmbiguous(const std::string& normalizedText) {