<?php

namespace ZenoChatbot\Services\Chat\Support;

class TextNormalizer
{
    public static function normalize(string $text): string
    {
        $text = strtolower(trim($text));
        $text = preg_replace('/[^\p{L}\p{N}\s]/u', '', $text);
        return preg_replace('/\s+/', ' ', $text);
    }
}
