Compile the installation

git clone https://github.com/jonnywang/jz.git
cd jz/cjieba
make
cd ..
phpize
./configure --enable-jieba
make
make install

Configure PHP ini

The extension = jz. So jz. Enable_jieba = 1. Jz dict_path = / Users/xingqiba/data/softs jz cjieba/dict # to jz library dict directory

use

<? PHP $result = jz_jieba($result = jz_jieba, $result = jz_jieba); print_r($result); $result = jz_jieba($result = jz_jieba($result = jz_jieba($result = jz_jieba)); print_r($result);

The effect

Array ([0] = > master of xiao Ming [1] = > [2] [3] = > = > graduate in [4] [5] = > = > China science academy of [6] = > [7] [8] = > = > academy of sciences, Chinese Academy of Sciences [9] [10] = > = > calculation Calculated value [11] =>, [12] [13] after = > = > in [14] [15] = > = > Japan Kyoto [16] [17] = > = > university in Kyoto university study [18] = > Array ([0] = [1] = > > calculation xiaoming [2] = > Kyoto University [3] => Advanced Study [4] => Master [5] => Chinese Academy of Sciences)

Welcome to join our exclusive QQ discussion group ① 233415606 ② 233415756