Home  >  Article  >  php教程  >  dedecms分词系统调用代码

dedecms分词系统调用代码

WBOY
WBOYOriginal
2016-06-13 11:24:341220browse

这里你可以下载dedecms然后找到lib_splitword_full.php这个文件,或者到http://down.php100.com下载分词包,按照下面的方法就可以正确的使用dedecms的分词系统了。

dedecms分词系统调用代码
/*
这里你可以下载dedecms然后找到lib_splitword_full.php教程这个文件,或者到http://down.php100.com下载分词包,按照下面的方法就可以正确的使用dedecms的分词系统了。
*/
require("lib_splitword_full.php");

$str = "一线楼市交易清淡";


$t1 = exectime();

$sp = new splitword();

$t2 = exectime();

//$t0 = $t2-$t1;

//echo "载入时间: $t0

";


echo $sp->findnewword($sp->splitrmm($str))."


";
echo $sp->splitrmm($str)."
";

$sp->clear();

echo $str."
";

$t3 = exectime();
$t0 = $t3-$t2;
echo "
处理时间: $t0

";


function exectime(){
 $time = explode(" ", microtime());
 $usec = (double)$time[0];
 $sec = (double)$time[1];
 return $sec + $usec;
}


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn