PHP 搜寻分词

WBOY
Release: 2016-06-13 13:08:26
Original
958 people have browsed it

PHP 搜索分词
1. 简单的英文分词

<?php    
    $search = 'this is a testing';  
    $words = explode(' ', $search);     
    $length = count($words);  
    for($i = 0; $i < $length; $i++) echo $words[$i].'<br />';  
?>    
Copy after login


2. 简单的中英文分词

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

见附件

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!