PHPackages                             naux/auto-correct - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. naux/auto-correct

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

naux/auto-correct
=================

v1.0.3(8y ago)12511.4k↓66.7%82MITPHP

Since Apr 7Pushed 6y ago5 watchersCompare

[ Source](https://github.com/NauxLiu/auto-correct)[ Packagist](https://packagist.org/packages/naux/auto-correct)[ RSS](/packages/naux-auto-correct/feed)WikiDiscussions master Synced 1mo ago

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

auto-correct
============

[](#auto-correct)

自动给中英文之间加入合理的空格并纠正专用名词大小写

安装
--

[](#安装)

首先你需要安装有 `composer`，然后执行下面的命令安装：

```
composer require naux/auto-correct

```

使用
--

[](#使用)

```
use Naux\AutoCorrect;

$correct = new AutoCorrect;

// 在中英文之间加入合理的空格
$correct->auto_space("php是世界上最好的语言，之一"); // php 是世界上最好的语言，之一

// 纠正专用词汇大小写
$correct->auto_correct("php是世界上最好的语言，之一"); // PHP是世界上最好的语言，之一

// 加入空格并纠正词汇（auto_space + auto_correct）
$correct->convert("php是世界上最好的语言，之一"); // PHP 是世界上最好的语言，之一

//添加外置词典，可添加多个
echo $auto
  ->withDict(['hello world' => 'Hello World'])
  ->withDict(['foo bar' => 'Foo Bar'])
  ->convert('hello world, foo bar, phphub'); // Hello World, Foo Bar, PHPHub
```

应用案例
----

[](#应用案例)

[LaravelChina (PHPHub)](https://laravel-china.org/) - 整站标题都做了自动转换处理。

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~333 days

Total

4

Last Release

3058d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22071ff5935f95277f8b0c794c2f23703e6de307ed0e65e25e7c3a878a45c012?d=identicon)[NauxLiu](/maintainers/NauxLiu)

---

Top Contributors

[![nauxliu](https://avatars.githubusercontent.com/u/9570112?v=4)](https://github.com/nauxliu "nauxliu (24 commits)")[![overtrue](https://avatars.githubusercontent.com/u/1472352?v=4)](https://github.com/overtrue "overtrue (2 commits)")[![binaryoung](https://avatars.githubusercontent.com/u/5364548?v=4)](https://github.com/binaryoung "binaryoung (1 commits)")

### Embed Badge

![Health badge](/badges/naux-auto-correct/health.svg)

```
[![Health](https://phpackages.com/badges/naux-auto-correct/health.svg)](https://phpackages.com/packages/naux-auto-correct)
```

###  Alternatives

[zepgram/module-multi-threading

This module is a powerful tool for developers who want to process large data sets in a short amount of time

8122.2k](/packages/zepgram-module-multi-threading)

PHPackages © 2026

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