- Notifications
You must be signed in to change notification settings - Fork1
The Jieba Chinese Word Segmentation Implemented in Rust Bound for PHP.
License
NotificationsYou must be signed in to change notification settings
phper-framework/jieba-php
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Jieba 中文分词在 Rust 中实现,并为 PHP 提供绑定。
The Jieba Chinese Word Segmentation Implemented in Rust Bound for PHP.
- rust
- php-dev
# Optional, specify if php isn't installed globally.## export PHP_CONFIG=<Your path of php-config># Build libjieba.so.cargo build --release
php -d"extension=target/release/libjieba.so" --ri jiebaphp -d"extension=target/release/libjieba.so" -r"print_r((new Jieba())->cut('我们中出了一个叛徒'));"
class Jieba {publicfunction__construct();publicfunctioncut(string$sentence,bool$hmm):array;publicfunctioncutForSearch(string$sentence,bool$hmm):array;publicfunctioncutAll(string$sentence):array;}
<?php$jieba =newJieba();$words =$jieba->cut("我们中出了一个叛徒",true);print_r($words);$words =$jieba->cutAll("我们中出了一个叛徒");print_r($words);$words =$jieba->cutForSearch("我们中出了一个叛徒");print_r($words);
MulanPSL-2.0
About
The Jieba Chinese Word Segmentation Implemented in Rust Bound for PHP.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.