<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[张宴的博客]]></title> 
<link>http://zyan.cc/index.php</link> 
<description><![CDATA[Web系统架构与底层研发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[张宴的博客]]></copyright>
<item>
<link>http://zyan.cc/httpcws_v100/</link>
<title><![CDATA[基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>张宴 &lt;net@s135.com&gt;</author>
<category><![CDATA[搜索引擎技术]]></category>
<pubDate>Tue, 11 Aug 2009 00:45:05 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/</guid> 
<description>
<![CDATA[ 
	　　<strong>发布版本：</strong><br/>　　httpcws 1.0.0 （最新版本：2009-08-10发布）<br/><br/>　　程序网址：<a href="http://code.google.com/p/httpcws" target="_blank">http://code.google.com/p/httpcws</a><br/><br/>　　安装使用手册：<a href="http://blog.zyan.cc/httpcws_v100/" target="_blank">http://blog.zyan.cc/httpcws_v100/</a><br/><br/>　　下载地址（32位版）：<a href="http://httpcws.googlecode.com/files/httpcws-1.0.0-i386-bin.tar.gz" target="_blank">http://httpcws.googlecode.com/files/httpcws-1.0.0-i386-bin.tar.gz</a><br/><br/>　　下载地址（64位版）：<a href="http://httpcws.googlecode.com/files/httpcws-1.0.0-x86_64-bin.tar.gz" target="_blank">http://httpcws.googlecode.com/files/httpcws-1.0.0-x86_64-bin.tar.gz</a><br/><br/>　　中文分词在线演示：<a href="http://blog.zyan.cc/demo/httpcws/" target="_blank">http://blog.zyan.cc/demo/httpcws/</a><br/><br/>　　PHP演示程序下载：<a href="http://blog.zyan.cc/demo/httpcws/httpcws-php-demo.zip" target="_blank">http://blog.zyan.cc/demo/httpcws/httpcws-php-demo.zip</a><br/><br/><hr/><br/>　　<strong>httpcws 中文简介</strong><br/>　　<strong>1、什么是 httpcws ？</strong><br/>　　HTTPCWS 是一款基于HTTP协议的开源中文分词系统，目前仅支持Linux系统。HTTPCWS 使用“ICTCLAS 3.0 2009共享版中文分词算法”的API进行分词处理，得出分词结果。HTTPCWS 将取代本人之前开发的 <a href="http://code.google.com/p/phpcws/" target="_blank">PHPCWS 中文分词扩展</a>。<br/><br/>　　<a href="http://ictclas.org/sub_1_2.html" target="_blank">ICTCLAS</a>（Institute of Computing Technology, Chinese Lexical Analysis System）是中国科学院计算技术研究所在多年研究工作积累的基础上，基于多层隐马模型研制出的汉语词法分析系统，主要功能包括中文分词；词性标注；命名实体识别；新词识别；同时支持用户词典。ICTCLAS经过五年精心打造，内核升级6次，目前已经升级到了ICTCLAS3.0，分词精度98.45%，各种词典数据压缩后不到3M。ICTCLAS在国内973专家组组织的评测中活动获得了第一名，在第一届国际中文处理研究机构SigHan组织的评测中都获得了多项第一名，是当前世界上最好的汉语词法分析器。<br/><br/>　　ICTCLAS 3.0 商业版是收费的，而免费提供的 ICTCLAS 3.0 共享版不开源，词库是根据人民日报一个月的语料得出的，很多词语不存在。所以本人补充的一个19万条词语的自定义词库，对ICTCLAS分词结果进行合并处理，输出最终分词结果。<br/><br/>　　由于 ICTCLAS 3.0 2009 共享版只支持GBK编码，因此，如果是UTF-8编码的字符串，可以先用iconv函数转换成GBK编码，再用httpcws进行分词处理，最后转换回UTF-8编码。<br/><br/>　　HTTPCWS 软件自身（包括httpcws.cpp源文件、dict/httpcws_dict.txt自定义词库）采用NewBSD开源协议，可以自由修改。HTTPCWS 使用的 ICTCLAS 共享版 API 及 dict/Data/ 目录内的语料库，版权及著作权归中国科学院计算技术研究所、ictclas.org所有，使用需遵循其相关协议。<br/><br/><hr/><br/>　　<strong>2、httpcws 中文分词在线演示</strong><br/>　　<span style="color: #FF0000;">演示网址：</span><a href="http://blog.zyan.cc/demo/httpcws/" target="_blank">http://blog.zyan.cc/demo/httpcws/</a><br/><br/><hr/><br/>　　<strong>3、httpcws 中文分词下载安装</strong><br/>　　32位版：<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">cd /usr/local/<br/>wget <a href="http://httpcws.googlecode.com/files/httpcws-1.0.0-i386-bin.tar.gz" target="_blank">http://httpcws.googlecode.com/files/httpcws-1.0.0-i386-bin.tar.gz</a><br/>tar zxvf httpcws-1.0.0-i386-bin.tar.gz<br/>rm -f httpcws-1.0.0-i386-bin.tar.gz<br/>cd httpcws-1.0.0-i386-bin/<br/>ulimit -SHn 65535<br/>/usr/local/httpcws-1.0.0-i386-bin/httpcws -d -x /usr/local/httpcws-1.0.0-i386-bin/dict/</div><br/><br/>　　64位版：<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">cd /usr/local/<br/>wget <a href="http://httpcws.googlecode.com/files/httpcws-1.0.0-x86_64-bin.tar.gz" target="_blank">http://httpcws.googlecode.com/files/httpcws-1.0.0-x86_64-bin.tar.gz</a><br/>tar zxvf httpcws-1.0.0-x86_64-bin.tar.gz<br/>rm -f httpcws-1.0.0-x86_64-bin.tar.gz<br/>cd httpcws-1.0.0-x86_64-bin/<br/>ulimit -SHn 65535<br/>/usr/local/httpcws-1.0.0-x86_64-bin/httpcws -d -x /usr/local/httpcws-1.0.0-x86_64-bin/dict/</div><br/><br/>　　命令行启动参数：<br/><br/>　　<a href="http://zyan.cc/attachment/200908/httpcws-help.png" target="_blank"><img src="http://zyan.cc/attachment/200908/httpcws-help.png" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/><hr/><br/>　　<strong>4、httpcws 使用方法</strong><br/>　　GET方法（文本长度受URL的长度限制，需要分词的文本为GBK编码，最好采用urlencode对文本进行编码）：<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;"><a href="http://192.168.8.42:1985/?w=" target="_blank">http://192.168.8.42:1985/?w=</a>有人的地方就有江湖<br/><a href="http://192.168.8.42:1985/?w=%D3%D0%C8%CB%B5%C4%B5%D8%B7%BD%BE%CD%D3%D0%BD%AD%BA%FE" target="_blank">http://192.168.8.42:1985/?w=%D3%D0%C8%CB%B5%C4%B5%D8%B7%BD%BE%CD%D3%D0%BD%AD%BA%FE</a></div><br/><br/>　　POST方法（文本长度无限制，适用于大文本分词，需要分词的文本为GBK编码，最好采用urlencode对文本进行编码）：<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">curl -d "有人的地方就有江湖" <a href="http://192.168.8.42:1985" target="_blank">http://192.168.8.42:1985</a><br/>curl -d "%D3%D0%C8%CB%B5%C4%B5%D8%B7%BD%BE%CD%D3%D0%BD%AD%BA%FE" <a href="http://192.168.8.42:1985" target="_blank">http://192.168.8.42:1985</a></div><br/><br/>　　<strong>PHP 调用 HTTPCWS 示例：</strong><br/><br/>　　①、对GBK编码的字符串进行中文分词处理（HTTP POST方式）：<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">&lt;?php<br/>@header('Content-Type: text/html; charset=gb2312'); <br/>$text = "有人的地方就有江湖";<br/>$text = urlencode($text);<br/>$opts = array(<br/>&nbsp;&nbsp;'http'=>array(<br/>&nbsp;&nbsp;&nbsp;&nbsp;'method'=>"POST",<br/>&nbsp;&nbsp;&nbsp;&nbsp;'header'=>"Content-type: application/x-www-form-urlencoded&#92;r&#92;n".<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Content-length:".strlen($data)."&#92;r&#92;n" .<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Cookie: foo=bar&#92;r&#92;n" .<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&#92;r&#92;n",<br/>&nbsp;&nbsp;&nbsp;&nbsp;'content' => $text,<br/>&nbsp;&nbsp;)<br/>);<br/>$context = stream_context_create($opts);<br/>$result = file_get_contents("http://127.0.0.1:1985", false, $context);<br/>echo $result;<br/>?></div><br/><br/>............<br/><br/>Tags - <a href="http://zyan.cc/tags/httpcws/" rel="tag">httpcws</a> , <a href="http://zyan.cc/tags/phpcws/" rel="tag">phpcws</a> , <a href="http://zyan.cc/tags/%25E4%25B8%25AD%25E6%2596%2587%25E5%2588%2586%25E8%25AF%258D/" rel="tag">中文分词</a> , <a href="http://zyan.cc/tags/%25E6%25B1%2589%25E8%25AF%25AD%25E5%2588%2586%25E8%25AF%258D/" rel="tag">汉语分词</a> , <a href="http://zyan.cc/tags/%25E6%2590%259C%25E7%25B4%25A2%25E5%25BC%2595%25E6%2593%258E/" rel="tag">搜索引擎</a> , <a href="http://zyan.cc/tags/%25E5%2588%2586%25E8%25AF%258D/" rel="tag">分词</a> , <a href="http://zyan.cc/tags/ictclas/" rel="tag">ictclas</a>
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3838</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>jj &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 11 Aug 2009 02:24:37 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3838</guid> 
<description>
<![CDATA[ 
	哈哈<br/><br/>一直在等PHPCWS的64位版，没想到等来的是另一番风景!
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3839</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>airwin &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 11 Aug 2009 03:34:01 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3839</guid> 
<description>
<![CDATA[ 
	赞! 刚在瑞豪买了个vps, 装上试试去~为作者张宴的开源精神感动 :)
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3840</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>uuuuu &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 11 Aug 2009 05:17:40 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3840</guid> 
<description>
<![CDATA[ 
	好强大啊
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3841</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>addcn &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 11 Aug 2009 05:52:15 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3841</guid> 
<description>
<![CDATA[ 
	感謝分享，down回去研究一下
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3845</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>小宝 &lt;ilsanbao@163.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 11 Aug 2009 08:17:37 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3845</guid> 
<description>
<![CDATA[ 
	占个位，研究一下！
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3846</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>haijd &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 11 Aug 2009 08:22:12 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3846</guid> 
<description>
<![CDATA[ 
	在 Solidot 看到介绍后就赶忙装了一个，大致测试了一下感觉效果不错！感谢作者分享！
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3849</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>芸临浙商大 &lt;zhujingfa@live.cn&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 11 Aug 2009 09:24:51 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3849</guid> 
<description>
<![CDATA[ 
	前排支持~~HOHO~漫漫看
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3850</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>truefire &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 11 Aug 2009 09:25:26 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3850</guid> 
<description>
<![CDATA[ 
	赞！有个问题请教一下，如何停掉这个?是直接kill掉吗，kill掉后占用的内存会被释放掉吧，谢谢了!
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3853</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>uuuuu &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 11 Aug 2009 14:58:19 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3853</guid> 
<description>
<![CDATA[ 
	问个问题 我的mysql库是gbk的 <br/>sphinx 中文一元切分 却需要 uft8 支持 <br/><br/>sphinx.conf 应该中应该怎么处理编码转换<br/><br/>还是只能将库转换成utf8
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3854</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>pete &lt;cuipeng99@126.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 11 Aug 2009 15:37:09 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3854</guid> 
<description>
<![CDATA[ 
	请问有和开源搜索引擎结合的演示程序吗？
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3856</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>demoneyes &lt;cangmimi@gmail.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 11 Aug 2009 15:50:08 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3856</guid> 
<description>
<![CDATA[ 
	我也是用 sphinx ,请问怎样把 httpcws 结合到sphinx (在sphinx建立索引时候调用httpcws进行中文切词)
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3859</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>kakashilw &lt;foxlw@126.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 12 Aug 2009 05:17:41 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3859</guid> 
<description>
<![CDATA[ 
	要是增加分词的【权重】就更好了。。。
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3860</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>wayne &lt;zzw45@126.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 12 Aug 2009 05:57:18 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3860</guid> 
<description>
<![CDATA[ 
	请问httpcws 他可以把字典里包含的几个词返回吗？<br/><br/>比如<br/>“我是一个好宝宝，明天去上学！”<br/><br/>字典里只有“天下、宝宝、明天、游戏”<br/><br/>通过检查后，就把匹配的，宝宝和明天返回？
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3863</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>lj &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 13 Aug 2009 02:09:00 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3863</guid> 
<description>
<![CDATA[ 
	怎么从来都是搞一些没有意义的东西？直接用ICTCLAS就好了！<br/>要么写点核心代码 不要核心代码总用别人的<br/>没有特点
]]>
</description>
</item><item>
<link>http://zyan.cc/httpcws_v100/#blogcomment3865</link>
<title><![CDATA[[评论] 基于HTTP协议的开源中文分词系统：HTTPCWS 1.0.0 发布[原创]]]></title> 
<author>nickname &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 13 Aug 2009 03:33:06 +0000</pubDate> 
<guid>http://zyan.cc/httpcws_v100/#blogcomment3865</guid> 
<description>
<![CDATA[ 
	这个跟web services有什么区别？用libevent和基于apache+php或者ngins+php，甚至是erlang的mochiweb的基础上，性能有什么优势么？或者从开发代价和性能收获来看？
]]>
</description>
</item>
</channel>
</rss>