PHP code example of technote / igo-php

1. Go to this page and download the library: Download technote/igo-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

technote / igo-php example snippets



 = new Igo\Tagger(['dict_dir' => '/home/user/jdic']);
$result = $igo->wakati('すもももももももものうち');
print_r($result);


 = new Igo\Tagger(['dict_dir' => '/home/user/jdic']);
$result = $igo->parse('すもももももももものうち');
print_r($result);


 = new Igo\Tagger([
    'dict_dir'        => '/home/user/jdic',
    'output_encoding' => 'Shift_JIS'
]);


 = new Igo\Tagger([
    'dict_dir'    => '/home/user/jdic',
    'reduce_mode' => false
]);


ini_set('memory_limit', '1073741824'); //1024^3


 = new Igo\Tagger(array(
    'dict_dir'      => '/home/user/jdic',
    'little_endian' => true //true->Little endian, false->Big endian
));
shell
$ composer