Developed with love by KnpLabs Hire us for your project!
17

JpnForPhpBundle

by albertofem

Integrates jpnforphp as a Symfony bundle

JpnForPhpBundle

build status Scrutinizer Code Quality

Integrates jpnforphp library with the Symfony2 framework.

More info: http://mbilbille.github.io/jpnforphp/

Installation

Require it in composer:

composer require albertofem/jpnforphp-bundle dev-master

Install it:

composer update albertofem/jpnforphp-bundle

Add it to your bundles:

$bundles = array(
    ...,
    new AFM\Bundle\JpnForPhpBundle\JpnForPhpBundle()
);

Usage

This bundle aims to provider commands to access the library:

Inspect a sentence

php app/console jpnforphp:analyze:inspect 素晴らしいです

Output:

Analyzing: 素晴らしいです

Sentence length: 7
Total hiragana: 5
Total katakana: 0
Total Kanji: 2
Total non-japanese characters: 0
Punctuation marks: No

Transliteration services

Services are defined to access transliterators:

$hepburn = $this->container->get('jpnforphp.transliterator.romaji.hepburn')
$hepburn->transliterate('ローマジ で かいて');
Copyright (c) Alberto Fernández

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
  • Merge pull request #2 from nurikabe/patch-2
    By albertofem, 2 years ago
  • Fix grammar
    By nurikabe, 2 years ago
  • Merge pull request #1 from nurikabe/patch-1
    By albertofem, 2 years ago
  • Update composer.json
    By nurikabe, 2 years ago
  • Badges
    By albertofem, 2 years ago
  • Copyright stuff
    By albertofem, 2 years ago
  • Fixed travis button
    By albertofem, 2 years ago
  • Added build status
    By albertofem, 2 years ago
  • PHP 5.3 compatibility
    By albertofem, 2 years ago
  • Strict stuff
    By albertofem, 2 years ago
  • First bunch of code
    By albertofem, 2 years ago