GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — add README.md · andsky/phpjieba@0fd7ad8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboard
+46Lines changed: 46 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[phpjieba](https://github.com/andsky/phpjieba)
2+
=========
3+
4+
phpJieba是"结巴"中文分词的php语言版本。
5+
6+
7+
## 特点
8+
9+
+ 词典载入方式灵活,无需配置词典路径也可使用,需要定制自己的词典路径时也可灵活定制。
10+
+ 底层算法实现是C++,性能高效。
11+
+ 支持多种分词算法,各种分词算法见[CppJieba]的README.md介绍。
12+
+ 支持动态补充词库。
13+
14+
## 安装
15+
```
16+
git clone https://github.com/andsky/phpjieba.git
17+
cd phpjieba
18+
phpize
19+
./configure
20+
make
21+
make install
22+
23+
cp -R include/cjieba/dict /etc/jieba
24+
25+
## 用法
26+
27+
$j=new jieba();
28+
$rs = $j->cut('他来到了网易杭研大厦', true);
29+
print_r($rs);
30+
$rs =$j->cut('他来到了网易杭研大厦', false);
31+
print_r($rs);
32+
$rs = $j->cut_all('我来到北京清华大学');
33+
print_r($rs);
34+
$rs = $j->cut_for_search('我来到北京清华大学');
35+
print_r($rs);
36+
$rs = $j->extract_tags('我是拖拉机学院手扶拖拉机专业的。不用多久,我就会升职加薪,当上CEO,走上人生巅峰。');
37+
print_r($rs);
38+
$rs = $j->cut_tagging('我是拖拉机学院手扶拖拉机专业的。不用多久,我就会升职加薪,当上CEO,走上人生巅峰。');
39+
print_r($rs);
40+
41+
42+
## 鸣谢
43+
44+
[Jieba中文分词]
45+
[CppJieba]
46+

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.