##pullword pullword - The perl agent for Pullword(a online Chinese segmentation System) api! . æ¢åšåœ¨çº¿åˆ†è¯pullwordçš„perl客户端,支æŒç›´æŽ¥ç»“果以åŠä¸€ä¸ªåˆ†è¯è¯é¢‘çš„hash。 ##INSTALLATION 安装 To install this module, run the following commands: perl Makefile.PL make make test make install Or you can sample using cpan tool (用perl包管ç†å·¥å…·å®‰è£…): cpanm pullword ## SYNOPSIS 使用方法 use pullword; my $value='å…³å…³é›Žé¸ ï¼Œåœ¨æ²³ä¹‹æ´²ã€‚çªˆçª•æ·‘å¥³ï¼Œå›å好逑。 å‚å·®è‡èœï¼Œå·¦å³æµä¹‹ã€‚窈窕淑女,寤å¯æ±‚之。 求之ä¸å¾—,寤å¯æ€æœã€‚æ‚ å“‰æ‚ å“‰ï¼Œè¾—è½¬å侧。 å‚å·®è‡èœï¼Œå·¦å³é‡‡ä¹‹ã€‚窈窕淑女,ç´ç‘Ÿå‹ä¹‹ã€‚ å‚å·®è‡èœï¼Œå·¦å³èŠ¼ä¹‹ã€‚窈窕淑女,钟鼓ä¹ä¹‹ã€‚'; my $threshold=0.5; my $debug=1; # 直接输出分è¯è¿”å›žç»“æžœï¼ˆæ–‡æœ¬æ ¼å¼ï¼‰ã€‚ print PWget($value,$threshold,$debug); # 以分è¯åˆ†å¸ƒé¢‘度的hash的结果。 my $fchash=PWhash($value); print "$_ $fchash->{$_} \n" for(sort{$fchash->{$b}<=>$fchash->{$a}} keys %{$fchash}); ## Result 结果展示 ### 直接分è¯ç»“æžœ(Mojo::webqq 在线分è¯) æ¡”å 11:29:02 åˆ†è¯ å‚å·®è‡èœï¼Œå·¦å³æµä¹‹ã€‚窈窕淑女,寤å¯æ±‚之 Washington 11:29:02 å‚å·®:0.403159 å‚å·®è‡èœ:1 è‡èœ:0.046988 å·¦å³:1 窈窕:0.400039 窈窕淑女:0.908464 淑女:0.460456 女,:0.572975 寤å¯:0.828164 寤å¯æ±‚之:0.970102 (æºäºŽMojo-Webqqæ¡”å分è¯æœºå™¨äººæ’件) ### 频度hash结果 窈窕淑女 4 淑女 4 窈窕 4 女, 4 å‚å·®è‡èœ 3 è‡èœ 3 å‚å·® 3 å·¦å³ 3 å¯¤å¯ 2 æ‚ å“‰ 2 ä¸å¾— 1 ä¹ä¹‹ 1 辗转 1 求之ä¸å¾— 1 关关 1 好逑 1 寤å¯æ±‚之 1 æ€æœ 1 æ‚ å“‰æ‚ å“‰ 1 ç´ç‘Ÿ 1 辗转å侧 1 å…³å…³é›Žé¸ 1 å›å好逑 1 钟鼓 1 å侧 1 关雎 1 å›å 1 å› 1 é›Žé¸ 1 在河之洲 1 é¼“ä¹ 1 å…³é›Žé¸ 1 ##SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc pullword You can also look for information at: ### RT, CPAN's request tracker (report bugs here) http://rt.cpan.org/NoAuth/Bugs.html?Dist=pullword ### AnnoCPAN, Annotated CPAN documentation http://annocpan.org/dist/pullword ### CPAN Ratings http://cpanratings.perl.org/d/pullword ### Search CPAN http://search.cpan.org/dist/pullword/ ###Git repo [github] (https://github.com/bollwarm/pullword.git) [oschina] (https://git.oschina.net/ijz/pullword.git) ##LICENSE AND COPYRIGHT Copyright (C) 2016 ORANGE This program is released under the following license: Perl