-
Notifications
You must be signed in to change notification settings - Fork 4
kokukuma/php-kakasi
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
php-kakasi ========== This extension is Wrapper Program of KAKASI. KAKASI Project : http://kakasi.namazu.org/index.html.ja Function overview ----------------- This program has 2 function. KAKASI_MORPHEME(string $word) : This function generate a morpheme word arrray based on $word. KAKASI_CONVERT(string $word) : This function generate a wordset-object based on the argument. wordset-object has 4 member variable. base : original word hira : reprocessed word in Hiragana kata : reprocessed word in Katakana alph : reprocessed word in Alphabet How to install -------------- +--- Download and Compile $ git clone [email protected]:kokukuma/php-kakasi.git $ cd php-kakasi/kakasi $ phpize $ ./configure $ make $ make install +--- Write the configuration in php.ini $ cat /etc/php.ini | grep kakasi extension=kakasi.so Example usage ------------- +--- Japanese language morphological analysis $wordset = KAKASI_MORPHEME("狩野達也君"); var_dump($wordset); ---> array(3) { [0]=> string(6) "狩野" [1]=> string(6) "達也" [2]=> string(3) "君" +--- Character conversion $wordset = KAKASI_CONVERT("狩野タツヤくん"); var_dump($wordset); ---> object(stdClass)#2 (4) { ["base"]=> string(21) "狩野タツヤくん" ["hira"]=> string(21) "かのたつやくん" ["kata"]=> string(21) "カノタツヤクン" ["alph"]=> string(14) "kanotatsuyakun" } Author ------ Tatsuya Karino <[email protected]> ---
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published