PHPackages                             angkor/khmercut - 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. angkor/khmercut

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

angkor/khmercut
===============

Khmer Tokenization

0.2.0(1y ago)2349↓50%MITPHPPHP ^8.3CI passing

Since Aug 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ankgordotdev/khmercut)[ Packagist](https://packagist.org/packages/angkor/khmercut)[ RSS](/packages/angkor-khmercut/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (12)Versions (5)Used By (0)

Khmercut
========

[](#khmercut)

[![Status](https://github.com/ankgordotdev/khmercut/actions/workflows/tests.yml/badge.svg)](https://github.com/ankgordotdev/khmercut)[![Total Downloads](https://camo.githubusercontent.com/de051a4693249f7bfb38ba22d46a41bdf51078b518fdc12767ce864e3e00daed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e676b6f722f6b686d6572637574)](https://packagist.org/packages/angkor/khmercut)[![Latest Stable Version](https://camo.githubusercontent.com/81c25a4bee1a14db3885905059d08d3fa361065e38d7e2ec58751cc645cffe2e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e676b6f722f6b686d6572637574)](https://packagist.org/packages/angkor/khmercut)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://packagist.org/packages/angkor/khmercut)

`Khmercut` is a wrapper for the PHP Laravel framework, built on top of the Rust package created by [seanghay/khmercut](https://github.com/seanghay/khmercut). This allows developers to leverage the functionality provided by the `khmercut` Rust package within a Laravel application.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require angkor/khmercut
```

Download
--------

[](#download)

You can download the built from [Release](https://github.com/semsphy/khmercut-rs/releases) link and choose the right platform and move it to where want it to be.

Usage
-----

[](#usage)

Publish the configuration file to set the binary path

```
php artisan vendor:publish --provider="Angkor\Khmercut\KhmercutServiceProvider" --tag="config"
```

Setup the `.env` variable

```
TOKENIZER_BINARY_PATH=usr/local/bin/khmercut
```

```
use use Angkor\Khmercut\Tokenizer;

Tokenizer::make('Pretty girl សួស្តីស្រីស្អាត Hello World សួស្តីពិភពលោក');

//output: "Pretty girl សួស្តី\u{200B}ស្រី\u{200B}ស្អាត Hello World សួស្តី\u{200B}ពិភពលោក";

Tokenizer::make('Pretty girl សួស្តីស្រីស្អាត Hello World សួស្តីពិភពលោក', '|');

//output: "Pretty girl សួស្តី|ស្រី|ស្អាត Hello World សួស្តី|ពិភពលោក";
```

`Tokenizer` will add the `ZERO WIDTH SPACE` only Khmer Word.

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Sophy SEM](https://github.com/semsphy)
- [Seanghay Yath](https://github.com/seanghay)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance48

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.3% 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 ~82 days

Total

4

Last Release

380d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b26c90a41092eff8e5a83d3790a63cff5eef411291844571601487148e46a0b8?d=identicon)[angkor](/maintainers/angkor)

---

Top Contributors

[![semsphy](https://avatars.githubusercontent.com/u/423396?v=4)](https://github.com/semsphy "semsphy (8 commits)")[![angkorean](https://avatars.githubusercontent.com/u/167671546?v=4)](https://github.com/angkorean "angkorean (7 commits)")

---

Tags

khmertokenizer

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/angkor-khmercut/health.svg)

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

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[tonysm/rich-text-laravel

Integrates Trix content with Laravel

46577.8k1](/packages/tonysm-rich-text-laravel)[mauricius/laravel-htmx

Laravel helper library for Htmx

364101.1k1](/packages/mauricius-laravel-htmx)[illuminate/reflection

The Illuminate Reflection package.

371.6M3](/packages/illuminate-reflection)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[spatie/laravel-screenshot

Take screenshots of web pages in Laravel apps

7615.9k2](/packages/spatie-laravel-screenshot)

PHPackages © 2026

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