public function preProcessTextForService($text) { $text = trim($text); $text = html_entity_decode($text); $text = Lexicon($text, $this->lexiconVersion); return $text; //return preg_replace("/[^a-zA-Z0-9\s]/" , "" , $text); }
public function preProcessTextForService($text) { $text = trim($text); $text = html_entity_decode($text); //do check on banned words and attempt a preg_replace on the transcription text //should replace this with a word replacement array and iterate over it. //pronunciation can be improved here. //BUILD A LEXICON/TRAINER $text = Lexicon($text, $this->lexiconVersion); return $text; //return preg_replace("/[^a-zA-Z0-9\s]/" , "" , $text); }