当前位置: 代码迷 >> PHP >> PHP 搜寻分词
  详细解决方案

PHP 搜寻分词

热度:628   发布时间:2012-10-29 10:03:53.0
PHP 搜索分词
1. 简单的英文分词
<?php    
    $search = 'this is a testing';  
    $words = explode(' ', $search);     
    $length = count($words);  
    for($i = 0; $i < $length; $i++) echo $words[$i].'<br />';  
?>    


2. 简单的中英文分词

来源 1 :http://bbs.phpchina.com/forum.php?mod=viewthread&tid=61831
来源 2 :提取dede分词算法的一个类 http://helion.name/archives/127.html

见附件
  相关解决方案