示例#1
0
 static function parseKey($str)
 {
     static $cache = array();
     if (isset($cache[$str])) {
         return $cache[$str];
     }
     $words = array();
     $arr = explode(' ', $str);
     foreach ($arr as $cur) {
         if ($cur !== '') {
             if (!isset(hq::$stopWords[$cur])) {
                 $cur = hq::dropPlus($cur);
                 if ($cur !== '') {
                     $words[] = array(hq::morf($cur), '!' . hq::dropSyntax($cur));
                 }
             }
         }
     }
     $cache[$str] = $words;
     return $words;
 }