public function train($label, $text) { $keywords = $this->parse($text); $this->getStorage()->insertLabel($label); foreach ($keywords as $k) { $this->getStorage()->insertWord($k, $label); } }