-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
161 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/php | ||
<?php | ||
/** | ||
* demo_tokenize.php | ||
* | ||
* PHP version 5 | ||
* | ||
* @category PHP | ||
* @package /src/cmd/ | ||
* @author Fukuball Lin <[email protected]> | ||
* @license MIT Licence | ||
* @version GIT: <fukuball/jieba-php> | ||
* @link https://github.com/fukuball/jieba-php | ||
*/ | ||
ini_set('memory_limit', '1024M'); | ||
|
||
require_once dirname(dirname(__FILE__))."/vendor/multi-array/MultiArray.php"; | ||
require_once dirname(dirname(__FILE__))."/vendor/multi-array/Factory/MultiArrayFactory.php"; | ||
require_once dirname(dirname(__FILE__))."/class/Jieba.php"; | ||
require_once dirname(dirname(__FILE__))."/class/Finalseg.php"; | ||
use Fukuball\Jieba\Jieba; | ||
use Fukuball\Jieba\Finalseg; | ||
Jieba::init(array('mode'=>'test','dict'=>'big')); | ||
Finalseg::init(); | ||
|
||
$seg_list = Jieba::tokenize("永和服装饰品有限公司"); | ||
var_dump($seg_list); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters