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 — GitHub - andsky/phpjieba: The phpjieba extension

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
include/cjieba
include/cjieba
 
 
.gitignore
.gitignore
 
 
CREDITS
CREDITS
 
 
README.md
README.md
 
 
config.m4
config.m4
 
 
config.w32
config.w32
 
 
jieba.c
jieba.c
 
 
jieba.ini
jieba.ini
 
 
jieba.php
jieba.php
 
 
php_jieba.h
php_jieba.h
 
 

Repository files navigation

phpjieba

phpJieba是"结巴"中文分词的php语言版本。

特点

  • 词典载入方式灵活,无需配置词典路径也可使用,需要定制自己的词典路径时也可灵活定制。
  • 底层算法实现是C++,性能高效。
  • 支持多种分词算法,各种分词算法见CppJieba的README.md介绍。
  • 支持动态补充词库。

安装

git clone https://github.com/andsky/phpjieba.git
cd phpjieba
phpize
./configure
make
make install

cp -R include/cjieba/dict /etc/jieba

用法

$j=new jieba();
$rs = $j->cut('他来到了网易杭研大厦', true);
print_r($rs);
$rs =$j->cut('他来到了网易杭研大厦', false);
print_r($rs);
$rs = $j->cut_all('我来到北京清华大学');
print_r($rs);
$rs = $j->cut_for_search('我来到北京清华大学');
print_r($rs);
$rs = $j->extract_tags('我是拖拉机学院手扶拖拉机专业的。不用多久,我就会升职加薪,当上CEO,走上人生巅峰。');
print_r($rs);
$rs = $j->cut_tagging('我是拖拉机学院手扶拖拉机专业的。不用多久,我就会升职加薪,当上CEO,走上人生巅峰。');
print_r($rs);

鸣谢

Jieba中文分词 CppJieba

About

The phpjieba extension

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — 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.