advancedNormalize static method
Advanced normalization that includes:
- Diacritic removal
- Case normalization
- Whitespace normalization
- Special character handling
Implementation
static String advancedNormalize(String text) {
  if (text.isEmpty) return text;
  return text
      .toLowerCase()
      .trim()
      .replaceAll(RegExp(r'\s+'), ' ') // Normalize whitespace
      .replaceAll(RegExp(r'[^\w\s\-\.]'), '') // Remove special chars
      .replaceAll(RegExp(r'\s+'), ' ') // Clean up spaces again
      .trim();
}