PHPackages                             mbilbille/jpnforphp - 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. mbilbille/jpnforphp

AbandonedArchivedLibrary

mbilbille/jpnforphp
===================

A tiny PHP lib which provides nice functions &amp; wrappers to interact with Japanese language.

0.8.1(6y ago)76327.5k↓18.8%26[3 issues](https://github.com/mbilbille/jpnforphp/issues)2MITPHPPHP &gt;=7.1

Since Aug 5Pushed 2y ago6 watchersCompare

[ Source](https://github.com/mbilbille/jpnforphp)[ Packagist](https://packagist.org/packages/mbilbille/jpnforphp)[ Docs](http://mbilbille.github.com/jpnforphp/)[ RSS](/packages/mbilbille-jpnforphp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (15)Used By (2)

 [![](https://raw.githubusercontent.com/mbilbille/jpnforphp/gh-pages/images/logo.png)](https://raw.githubusercontent.com/mbilbille/jpnforphp/gh-pages/images/logo.png)

 JpnForPhp provides support and many helpers to play with Japanese language in PHP.

 [![Build Status](https://camo.githubusercontent.com/3c433b78031693c158c20e8a537fb9caa99a4c82aaae2c2b695069a06c2a3d5f/68747470733a2f2f7472617669732d63692e6f72672f6d62696c62696c6c652f6a706e666f727068702e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/mbilbille/jpnforphp)

---

The JpnForPhp toolbox provides over 30 functions build around various components that support both basic actions: **split, extract, etc.** as well as more specialized and powerful features: **transliteration, inflection, conversion**, and so one.

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

[](#installation)

The recommended way to install JpnForPhp is through [Composer](http://getcomposer.org/). Just create a composer.json file and run the php composer.phar install command to install it:

```
{
    "require": {
        "mbilbille/jpnforphp": "~0.7"
    }
}
```

Components
----------

[](#components)

[![Components](https://camo.githubusercontent.com/532c0790f80ce74c19f460b73d7662f57ee2270323823c1f02281c3ff37bbaf1/68747470733a2f2f7261772e6769746875622e636f6d2f6d62696c62696c6c652f6a706e666f727068702f67682d70616765732f696d616765732f636f6d706f6e656e74735f736368656d612e706e67)](https://camo.githubusercontent.com/532c0790f80ce74c19f460b73d7662f57ee2270323823c1f02281c3ff37bbaf1/68747470733a2f2f7261772e6769746875622e636f6d2f6d62696c62696c6c652f6a706e666f727068702f67682d70616765732f696d616765732f636f6d706f6e656e74735f736368656d612e706e67)

- [Helper](https://github.com/mbilbille/jpnforphp/tree/master/src/JpnForPhp/Helper)
- [Analyzer](https://github.com/mbilbille/jpnforphp/tree/master/src/JpnForPhp/Analyzer)
- [Transliterator](https://github.com/mbilbille/jpnforphp/tree/master/src/JpnForPhp/Transliterator)
- [Converter](https://github.com/mbilbille/jpnforphp/tree/master/src/JpnForPhp/Converter)
- [Inflector](https://github.com/mbilbille/jpnforphp/tree/master/src/JpnForPhp/Inflector)

#### Transliterator

[](#transliterator)

JpnForPhp Transliterator component supports all mainstream romanization systems:

- [Hepburn](http://en.wikipedia.org/wiki/Hepburn_romanization)
- [Kunrei](http://en.wikipedia.org/wiki/Kunrei-shiki_romanization)
- [Nihon](http://en.wikipedia.org/wiki/Nihon-shiki_romanization)
- [Wapuro](http://en.wikipedia.org/wiki/W%C4%81puro_r%C5%8Dmaji)

⚠️ Component `Transliterator` has been rewritten in 0.7, use it as below:

```
  $transliterator = new Transliterator();
  $transliterator->setSystem(new Hepburn());
  $transliterator->transliterate('くるま');
```

#### Converter

[](#converter)

- [Japanese numeral](https://github.com/mbilbille/jpnforphp/blob/master/src/JpnForPhp/Converter/Converter.php#L374) (kanji, reading)
- [Western year](https://github.com/mbilbille/jpnforphp/blob/master/src/JpnForPhp/Converter/Converter.php#L451)
- [Japanese year](https://github.com/mbilbille/jpnforphp/blob/master/src/JpnForPhp/Converter/Converter.php#L515) (kanji, kana, romaji)

*More units should complement the `Converter` component in future release*

#### Inflector

[](#inflector)

JpnForPhp Inflector component supports many verbal and language forms which are all exposed in kanji, kana and romaji.

Verbal formPlainPolitePlain negativePolite negativePast••••-te form••••Potential••Passive••••Causative••••Causative alternative•Causative passive••••Provisional conditional••Conditional••••Imperative••••Command••Volitional••Gerund•Optative••⚠️ Component `Inflector` has been rewritten in 0.8, use it as below:

```
  $entries = InflectorUtils::getEntriesFromDatabase('食べる');
  Inflector::inflect($entries[0]);

  or

  $entry = new Entry();
  $entry->setKanji('食べる');
  $entry->setKana('たべる');
  $entry->setType('v1');
  Inflector::inflect($entry);
```

Tests
-----

[](#tests)

To run the test suite, you need [Composer](http://getcomposer.org/):

```
    $ php composer.phar install
    $ ./vendor/bin/phpunit
```

Want to help?
-------------

[](#want-to-help)

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for [contributing](https://github.com/mbilbille/jpnforphp/tree/master/CONTRIBUTING.md) and then check out one of our [issues](https://github.com/mbilbille/jpnforphp/issues).

[List of all contributors](https://github.com/mbilbille/jpnforphp/graphs/contributors)

Upcoming
--------

[](#upcoming)

Check out the *develop* branch to get all the latest code and change ()

License
-------

[](#license)

JpnForPhp was created by [Matthieu Bilbille](http://github.com/mbilbille) and released under the [MIT License](http://github.com/mbilbille/jpnforphp/blob/master/LICENSE).

Integration
-----------

[](#integration)

- **JPNlizer** integrates JpnForPhp into Drupal - [sandbox project](http://drupal.org/sandbox/mbilbille/1613510) \[Deprecated\]
- **JpnForPhpBundle**: integrates JpnForPhp as a Symfony2 Bundle - [JpnForPhpBundle](http://github.com/albertofem/JpnForPhpBundle) (by @albertofem)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity50

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.5% 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 ~206 days

Recently: every ~300 days

Total

13

Last Release

2553d ago

PHP version history (3 changes)0.3PHP &gt;=5.3.0

0.7.0PHP &gt;=5.4.0

0.8.1PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a4a77f04975f55eafb5457fc92cda1a7bc0e71366bd21d0013e147ced078d17?d=identicon)[mbilbille](/maintainers/mbilbille)

---

Top Contributors

[![mbilbille](https://avatars.githubusercontent.com/u/718938?v=4)](https://github.com/mbilbille "mbilbille (268 commits)")[![Akeru](https://avatars.githubusercontent.com/u/38859?v=4)](https://github.com/Akeru "Akeru (18 commits)")[![albertofem](https://avatars.githubusercontent.com/u/409472?v=4)](https://github.com/albertofem "albertofem (2 commits)")[![rumpl](https://avatars.githubusercontent.com/u/99933?v=4)](https://github.com/rumpl "rumpl (1 commits)")[![sanmai](https://avatars.githubusercontent.com/u/139488?v=4)](https://github.com/sanmai "sanmai (1 commits)")[![waffle-with-pears](https://avatars.githubusercontent.com/u/8701611?v=4)](https://github.com/waffle-with-pears "waffle-with-pears (1 commits)")[![karl-malakoff](https://avatars.githubusercontent.com/u/5793360?v=4)](https://github.com/karl-malakoff "karl-malakoff (1 commits)")[![mksuhale](https://avatars.githubusercontent.com/u/2707495?v=4)](https://github.com/mksuhale "mksuhale (1 commits)")

---

Tags

libraryjapanese

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mbilbille-jpnforphp/health.svg)

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

###  Alternatives

[filp/whoops

php error handling for cool kids

13.2k402.4M1.4k](/packages/filp-whoops)[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.6k](/packages/mockery-mockery)[league/iso3166

ISO 3166-1 PHP Library

70036.3M116](/packages/league-iso3166)[dekor/php-array-table

PHP Library for printing associative arrays as text table (similar to mysql terminal console)

296.6M2](/packages/dekor-php-array-table)[ecentria/ecentria-rest-bundle

Goal of this bundle is to simplify process of creating APIs with Symfony. We use already well-coded libraries, combine them together to simplify process and not to re-invent the wheel. We've chose REST and HATEOS to have unified standards of API requests and responses.

142.4k](/packages/ecentria-ecentria-rest-bundle)

PHPackages © 2026

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