承接 mbilbille/jpnforphp 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mbilbille/jpnforphp

最新稳定版本:0.8.1

Composer 安装命令:

composer require mbilbille/jpnforphp

包简介

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

README 文档

README

logo.png

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

Build Status

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

The recommended way to install JpnForPhp is through Composer. Just create a composer.json file and run the php composer.phar install command to install it:

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

Components

Components

Transliterator

JpnForPhp Transliterator component supports all mainstream romanization systems:

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

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

Converter

More units should complement the Converter component in future release

Inflector

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

Verbal form Plain Polite Plain negative Polite negative
Past
-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

To run the test suite, you need Composer:

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

Want to help?

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues.

List of all contributors

Upcoming

Check out the develop branch to get all the latest code and change (http://github.com/mbilbille/jpnforphp/tree/develop)

License

JpnForPhp was created by Matthieu Bilbille and released under the MIT License.

Integration

  • JPNlizer integrates JpnForPhp into Drupal - sandbox project [Deprecated]
  • JpnForPhpBundle: integrates JpnForPhp as a Symfony2 Bundle - JpnForPhpBundle (by @albertofem)

统计信息

  • 总下载量: 319.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 73
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 69
  • Watchers: 7
  • Forks: 22
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-07-31