
dedecms自身內置tag(keywords)獲取作用(北京市網站制作),但詞性標注一直不足精準。自然,針對日升級十數篇且對seo精準實行的客戶而言,手工制作鍵入能更強的操縱(高檔網站建設)。但針對主題風格較為廣泛、內容升級量大的客戶而言,dede split是并不大極致的。
discuz線上詞性標注是一個免費在線的提詞插口。后有數十萬中文論壇、supsite客戶,針對情境、體細胞詞典的健全有大量的數據信息。 這一微信小程序是根據discuz線上詞性標注批量更新已發內容的keywords(tag),假如信息量大(超過五萬)的或是云虛擬主機客戶得話,最好是自然環境搭到當地。速率會快一點。
操作方法,cms安裝文件,在建c.php,拷入以下幾點,自身相匹配編號用notepad設定相對gbk或utf8。運作 yourwebsite/c.php?id=1
<?php
require_once(dirname(__FILE__).”/include/common.inc.php”);$id = isset($id) && is_numeric($id) ? $id : 0;
for ($a=$id; $a<$id 10; $a ){
$row = $dsql->GetOne(” SELECT arc.title,tp.body FROM `@__archives` arc LEFT JOIN `@__addonarticle` tp ON arc.id=tp.aid where arc.id=’$a’ “);
if(is_array($row))
{
$title = $row['title'];
$body = $row['body'];
$keywords=zhgetkey($title.$body);
$dsql->ExecuteNoneQuery(” Update `@__archives` set keywords=’$keywords’ where id=’$a’ “);
echo $a.’:’.$keywords.’<br />’;
}
}
if ($a>80000){break;}echo “<script>”;
echo “setTimeout(”location.replace(‘c.php?id=$a’)”,0)”;
echo “</script>”;function zhgetkey($content s){
$rows = strip_tags($contents);
$arr = array(‘ ‘,’ ‘,”s”, “rn”, “n”, “r”, “t”, “>”, ““”, “””,”<br />”);
$qc_rows = str_replace($arr, ”, $rows);
if(strlen($qc_rows)>2400){
$qc_rows = substr($qc_rows, ’0′, ’2400′);
}
$data = @implode(”, file(“http://keyword.discuz.com/related_kw.html?title=$qc_rows&ics=gbk&ocs=gbk”));
preg_match_all(“/<kw>(.*)A[(.*)]](.*)></kw>/”,$data, $out, PREG_SET_ORDER);
$key=”";
for($i=0;$i<5;$i ){
$key=$key.$out[$i][2];
if($out[$i][2])$key=$key.”,”;
}
return $key;
}function cutstr_html($string, $sublen)
{
$string = strip_tags($string);
$string = preg_replace (‘/n/is’, ”, $string);
$string = preg_replace (‘/ | /is’, ”, $string);
$string = preg_replace (‘/ /is’, ”, $string);
preg_match_all(“/[x01-x7f]|[xc2-xdf][x80-xbf]|xe0[xa0-xbf][x80-xbf]|[xe1-xef][x80-xbf][x80-xbf]|xf0[x90-xbf][x80-xbf][x80-xbf]|[xf1-xf7][x80-xbf][x80-xbf][x80-xbf]/”, $string, $t_string);
if(count($t_string[0]) – 0 > $sublen) $string = join(”, array_slice($t_string[0], 0, $sublen)).”…”;
else $string = join(”, array_slice($t_string[0], 0, $sublen));
return $string;
}
?>
留下聯系方式,我們將會在一個工作日內與你聯系