PHPackages                             wxkxklmyt/pscws4 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. wxkxklmyt/pscws4

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

wxkxklmyt/pscws4
================

基于PSCWS4的中文分词工具

0.0.2(8y ago)55711[1 issues](https://github.com/wxkxklmyt/pscws4/issues)[1 PRs](https://github.com/wxkxklmyt/pscws4/pulls)PHPPHP &gt;=5.4.0

Since Dec 22Pushed 8y ago2 watchersCompare

[ Source](https://github.com/wxkxklmyt/pscws4)[ Packagist](https://packagist.org/packages/wxkxklmyt/pscws4)[ RSS](/packages/wxkxklmyt-pscws4/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

基于PSCWS4词库的PHP中文分词工具
====================

[](#基于pscws4词库的php中文分词工具)

词库官方网址：
这是用纯 PHP 代码实现的 C 版 Libscws 的全部功能，即第四版的 PSCWS
PSCWS4 使用文档：

---

### 安装

[](#安装)

```
composer require wxkxklmyt/pscws4
```

---

### 使用

[](#使用)

```
/**
 * SCWS中文分词
 *
 * @param string $text 分词字符串
 * @param number $number 权重高的词数量(默认5个)
 * @param string $type 返回类型,默认字符串
 * @param string $delimiter 分隔符
 * @return string|array 字符串|数组
 */
$scws = new Scws();
$scws -> scws('能做到柔和、善解、忍辱，才有办法与人结好缘。——证严法师《静思语》');
```

---

### 运行结果

[](#运行结果)

```
静思 善解 法师 柔和 做到
```

---

### 其它说明

[](#其它说明)

1. 默认返回结果为字符串，返回字符串支持自定义分隔符，默认为空格
2. 支持返回结果为数组
3. 支持返回词数量自定义，默认为5个

---

官网(我的梦)：---

**版权申明：这里只是把PSCWS4封装成composer包，词库版权属于原作者**

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3113d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19584259?v=4)[wxkxklmyt](/maintainers/wxkxklmyt)[@wxkxklmyt](https://github.com/wxkxklmyt)

---

Top Contributors

[![wxkxklmyt](https://avatars.githubusercontent.com/u/19584259?v=4)](https://github.com/wxkxklmyt "wxkxklmyt (10 commits)")

### Embed Badge

![Health badge](/badges/wxkxklmyt-pscws4/health.svg)

```
[![Health](https://phpackages.com/badges/wxkxklmyt-pscws4/health.svg)](https://phpackages.com/packages/wxkxklmyt-pscws4)
```

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19139.2M44](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9843.5k](/packages/sauladam-shipment-tracker)[moonshine/layouts-field

Field for repeating groups of fields for MoonShine

107.9k](/packages/moonshine-layouts-field)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

112.9k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
