PHPackages                             anderss0n/persiana - 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. anderss0n/persiana

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

anderss0n/persiana
==================

Persiana is a Persian text normalizer utility that support English for every day usage with texts.

v1.0(6y ago)032MITPHPPHP &gt;=7.0CI failing

Since Mar 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/MrAnderss0n/Persiana)[ Packagist](https://packagist.org/packages/anderss0n/persiana)[ Docs](https://github.com/MrAnderss0n/Persiana)[ RSS](/packages/anderss0n-persiana/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

[![Build Status](https://camo.githubusercontent.com/56d7570c07ca4d9b565df179d2dc5ca3ee3582175ffd47bf225ecab43b7528d2/68747470733a2f2f7472617669732d63692e636f6d2f4d72416e6465727373306e2f5065727369616e612e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/MrAnderss0n/Persiana)[![codecov.io](https://camo.githubusercontent.com/504b61c43e685529a988cc5ad611401295a121e7ead65c2d92529a27c4c29058/68747470733a2f2f636f6465636f762e696f2f6769746875622f4d72416e6465727373306e2f5065727369616e612f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/MrAnderss0n/Persiana?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/1007b741073447bfee915fb4b11e7e16b361f43b8e83d6e2c1f243755ae4fc1e/68747470733a2f2f706f7365722e707567782e6f72672f616e6465727373306e2f7065727369616e612f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/anderss0n/persiana)[![Total Downloads](https://camo.githubusercontent.com/2c98fb9a321fd98dccc8ee3269173c9896431aa6a0a26087d780f971bec5a0fe/68747470733a2f2f706f7365722e707567782e6f72672f616e6465727373306e2f7065727369616e612f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/anderss0n/persiana)[![Latest Unstable Version](https://camo.githubusercontent.com/3165264687131bf5e7db9027509786b7691a6a688a36446303d47c04911ed883/68747470733a2f2f706f7365722e707567782e6f72672f616e6465727373306e2f7065727369616e612f762f756e737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/anderss0n/persiana)[![License](https://camo.githubusercontent.com/998a1f1e583767f0a5bc4e0b8e76bc42c1810817fc09c50a20624d3ed2b7b12d/68747470733a2f2f706f7365722e707567782e6f72672f616e6465727373306e2f7065727369616e612f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/anderss0n/persiana)

Persiana
========

[](#persiana)

Persiana is a Persian text normalizer utility that support English for every day usage with texts.

Install
-------

[](#install)

### by Composer

[](#by-composer)

```
composer require anderss0n/persiana

```

### by Git

[](#by-git)

```
git clone git@github.com:MrAnderss0n/Persiana.git

```

How to use
----------

[](#how-to-use)

Use the following class into your PHP code:

```
use Anderss0n\Persiana\Normalizer;
```

Simple example:

```
echo Normalizer::tidySpaces('test the  new     package.'); // OUTPUT: test the new package.
```

### List of methods

[](#list-of-methods)

Static MethodsDescriptiontidySpacesConvert sequence of spaces to single space and trim it.dropBreakingLinesDrop breaking line to make sequence of text without new lines.dropPersianPhonemesDrop general Persian vowel phonemes.normalizePersianNumbersConvert Persian numbers to its English form.normalizePersianLettersConvert Arabic letters to Persian one.normalizeEnglishLettersConvert Latin letters to English one.normalizeWhiteSpacesConvert all type of spaces to standard one.fetchValidLettersFetch only Persian and English letters then tidy spaces.fetchInvalidCharactersFetch all thing instead of Persian and English letters.normalizeFull normalize uses this class functionality to prevent repeating usage.slugMake a slug for url usage.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

2242d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/96a6035553c0e132c10de7ea60614aeb81eaf69220f180bfde69bcc11d3e10af?d=identicon)[anderss0n](/maintainers/anderss0n)

---

Top Contributors

[![MrAnderss0n](https://avatars.githubusercontent.com/u/49141347?v=4)](https://github.com/MrAnderss0n "MrAnderss0n (26 commits)")

---

Tags

normalizerpersianfarsiconvertorpersian normalizerfarsi normalizerpersian convertorfarsi convertor

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/anderss0n-persiana/health.svg)

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

###  Alternatives

[symfony/polyfill-intl-normalizer

Symfony polyfill for intl's Normalizer class and related functions

2.1k830.2M36](/packages/symfony-polyfill-intl-normalizer)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k37.3M2.1k](/packages/ergebnis-composer-normalize)[fisharebest/ext-calendar

Implementation of the Arabic (Hijri), French, Gregorian, Jewish, Julian and Persian (Jalali) calendars. Also provides a replacement for the PHP ext/calendar extension.

36473.2k8](/packages/fisharebest-ext-calendar)[opilo/farsi

Farsi Tools for Dates and Numbers and Strings (with Laravel Validation Support)

333.2k1](/packages/opilo-farsi)[gamez/ramsey-uuid-normalizer

Symfony Normalizer and Denormalizer for ramsey/uuid

16619.1k3](/packages/gamez-ramsey-uuid-normalizer)[symfony_persia/symfonyjdate

Jalali (Shamsi) DateTime for Symfony2, Supports year higher than 2038

1010.6k](/packages/symfony-persia-symfonyjdate)

PHPackages © 2026

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