Download the PHP package deminy/jieba-php without Composer

On this page you can find all versions of the php package deminy/jieba-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package jieba-php

deminy/jieba-php

Build Status Latest Stable Version Codacy Badge Coding Standards PSR-4 License

"结巴中文分词"PHP版本:"结巴中文分词"是Sun Junyi开发的Python版的中文分词组件,后来衍生了多种语言实现,包括C++、Java、.NET、Go等等。这份PHP版本起始于fukuball之前做的PHP实现(v0.25),随后对其整体重写并作了各种更新和改进,包括代码升级、使用PHP 7的新功能重构代码、使用PSR-4管理autoloading、使用依赖注射等设计模式、更新单元测试的实现、以及更多的性能优化和代码更新等等。如果你需要相应的PHP扩展的版本,可考虑jonnywang写的结巴中文分词之PHP扩展

有关算法、词典生成等方面的问题,请参考结巴中文分词相关文档。

特点

安装使用

使用本库你需要至少给PHP分配1G内存限制或更多,主要是用来存储词典信息。随着进一步的优化(包括缓存方面的优化),内存消耗将会降低。

字符编码处理

本库默认假设用户使用的字符编码为UTF-8。如果运行环境非UTF-8,你可以参考下面的代码文件解决相关编码问题:

./examples/encoding.php

用法介绍

分词

请参考下面的代码文件:

./examples/default.php

添加自定义词典

开发者可以指定自己自定义的词典,以便包含jieba词库裡没有的词。虽然jieba有新词识别能力,但是自行添加新词可以保证更高的正确率。请参考下面的代码文件:

./examples/useUserDict.php

关键词提取

请参考下面的代码文件:

./examples/extractTags.php

词性分词

有关词性说明,请参考《词性标记》这篇文档。下面的代码文件可以提供更多的理解:

./examples/posseg.php

切换成繁体字典

请参考下面的代码文件:

./examples/big5.php

使用不同的序列化格式(BSON, JSON, MessagePack等)

请参考下面的代码文件:

./examples/useDifferentSerializers.php

常见问题

  1. 模型的数据是如何生成的?

  2. 术语说明

All versions of jieba-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
cache/cache Version ~0.4
league/csv Version ~8.2
psr/log Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package deminy/jieba-php contains the following files

Loading the files please wait ....