File tree Expand file tree Collapse file tree 1 file changed +55
-1
lines changed
Expand file tree Collapse file tree 1 file changed +55
-1
lines changed Original file line number Diff line number Diff line change 1- # httpscws
1+ HTTPSCWS
2+ ========
3+
4+ 简介
5+ -----
6+
7+ [ HTTPSCWS] [ 1 ] 是一个基于HTTP协议简易的中文分词系统,采用[ SCWS] ,它可以将输入的文本字符串根据设定好的选项切割后以数组形式返回每一个词汇。
8+ 它为中文而编写,暂时支持 utf8 字符集,适当的修改词典后也可以支持非中文的多字节语言切词(如日文、韩文等)。
9+ 除分词外,还提供一个简单的关键词汇统计功能,它内置了一个简单的算法来排序。
10+
11+ 需求
12+ -----
13+
14+ 本扩展需要 scws-1.x.x 的支持。
15+
16+ 安装
17+ -----
18+
19+ ``` shell
20+ # 先安装libevent
21+ $ yum install libevent-devel
22+
23+ # 安装scws
24+ $ wget http://www.xunsearch.com/scws/down/scws-1.2.2.tar.bz2
25+ $ tar xf scws-1.2.2.tar.bz2
26+ $ cd scws-1.2.2
27+ $ ./configure
28+ $ make
29+ $ make install
30+ $ cp -R etc /etc/scws
31+
32+ # 安装scws词库
33+ $ wget http://www.xunsearch.com/scws/down/scws-dict-chs-utf8.tar.bz2
34+ $ tar xf scws-dict-chs-utf8.tar.bz2
35+ $ mv dict.utf8.xdb /etc/scws
36+
37+ # 安装httpscws
38+ $ cd httpscws
39+ $ cmake .
40+ $ make
41+ $ mkdir /usr/local/httpscws
42+ $ cp httpscws /usr/local/httpscws
43+ ```
44+
45+ 启动服务
46+ --------
47+
48+ ``` shell
49+ $ /usr/local/httpscws/httpscws -d -l 127.0.0.1 -x /etc/scws/ -i /var/run/httpscws.pid
50+ ```
51+
52+ 作者
53+ ----
54+
55+ Ivan Lam * < ; ivan.lin.1985@gmail.com > ; *
You can’t perform that action at this time.
0 commit comments