php-kakasi's Introduction
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]> ---
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.