public function stem($text) { $normalizedText = Filter\TextNormalizer::normalizeText($text); $words = explode(' ', $normalizedText); $stems = array(); foreach ($words as $word) { $stems[] = $this->stemWord($word); } return implode(' ', $stems); }