Ejemplo n.º 1
0
 public function doAction()
 {
     $spellCheck = SpellCheckFactory::getInstance();
     $spellCheck->setLanguageCode($this->__postInput->lang);
     //$this->__postInput->sentence = strip_tags( $this->__postInput->sentence );
     $specials = array('/\\+/', '/\\*/', '/#/', '/~/', '/@/', '/\\^/');
     $replace_specials = array('\\+', '\\*', '\\#', '\\~', '\\@', '\\^');
     $sentence = preg_replace($specials, $replace_specials, $this->__postInput->sentence);
     $this->result['result'] = $spellCheck->getSuggestions($sentence);
 }
Ejemplo n.º 2
0
 public function doAction()
 {
     $spellCheck = SpellCheckFactory::getInstance();
     $spellCheck->setLanguageCode($this->__postInput->slang);
     $this->result['error'] = $spellCheck->dictAddWord($this->__postInput->word);
 }