PHP code example of rebib / igo-php

1. Go to this page and download the library: Download rebib/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/ */

    

rebib / igo-php example snippets



 = new Igo\Tagger();
$result = $igo->wakati('すもももももももものうち');
print_r($result);


 = new Igo\Tagger();
$result = $igo->parse('すもももももももものうち');
print_r($result);

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

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

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

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