使ã£ã¦ã¿ãã
æ¥æ¬èªæãå½¢æ ç´ ã«åå²ããåè©ãèªã¿ããªã®ä»ä¸ãçµ±è¨æ å ±ãåå¾ã§ããæ©è½ãæä¾ãã¾ãã
http://developer.yahoo.co.jp/jlp/MAService/V1/parse.html
ã¨ããããåãã°ããããã¨ããçã
#!/usr/bin/perl use strict; use LWP::UserAgent; use XML::Simple; use YAML qw/ Dump /; use Encode qw/ encode_utf8 /; my $ua = LWP::UserAgent->new(); $ua->env_proxy(); my $text; while (<>) { $text .= $_; } my $uri = q{http://api.jlp.yahoo.co.jp/MAService/V1/parse}; my $res = $ua->post( $uri, { appid => '******', sentence => $text, }, ); my $xml = $res->content; my $ref = XMLin( $res->content ); print Dump $ref; for my $w ( @{ $ref->{ma_result}->{word_list}->{word} } ) { print encode_utf8( sprintf "%s\t%s,%s\n", $w->{surface}, $w->{pos}, $w->{reading} ); }
å ¥åææ¸ã
æ¥æ¬èªå½¢æ ç´ è§£æWebãµã¼ãã¹ã¯ã24æé以å ã§1ã¤ã®IPã¢ãã¬ã¹ã«ã¤ã50000件ã®ãªã¯ã¨ã¹ãã ä¸éã¨ãªã£ã¦ãã¾ãã ã¾ãã1ãªã¯ã¨ã¹ãã®æ大ãµã¤ãºã100KBã«å¶éãã¦ãã¾ãã 詳ããã¯ãå©ç¨å¶éãããåç §ãã ããã
åºåçµæã
æ¥æ¬èª åè©,ã«ã£ã½ãã å½¢æ ç´ åè©,ããããã 解æ åè©,ãããã Web åè©,Web ãµã¼ãã¹ åè©,ãã¼ã³ã 㯠å©è©,㯠ã ç¹æ®,ã 24 åè©,24 æé æ¥å°¾è¾,ããã 以å æ¥å°¾è¾,ããªã 㧠å©è©,㧠1 åè©,1 㤠æ¥å°¾è¾,㤠㮠å©è©,ã® IP åè©,IP ã¢ãã¬ã¹ åè©,ãã©ãã ã« å©è©,ã« ã¤ã åè©,ã¤ã 50000 åè©,50000 件 æ¥å°¾è¾,ãã ã® å©è©,ã® ãªã¯ã¨ã¹ã åè©,ãããã㨠ã å©è©,ã ä¸é åè©,ããããã 㨠å©è©,㨠ãªã£ åè©,ãªã£ 㦠å©è©,㦠ã å©åè©,ã ã¾ã å©åè©,ã¾ã ã ç¹æ®,ã ã¾ã å¯è©,ã¾ã ã ç¹æ®,ã 1 åè©,1 ãªã¯ã¨ã¹ã åè©,ãããã㨠㮠å©è©,ã® æ大 åè©,ããã ã ãµã¤ãº åè©,ããã ã å©è©,ã 100 åè©,100 KB åè©,KB ã« å©è©,ã« å¶é åè©,ãããã ã å©åè©,ã 㦠å©è©,㦠ã å©åè©,ã ã¾ã å©åè©,ã¾ã ã ç¹æ®,ã 詳ãã 形容è©,ãããã 㯠å©è©,㯠ã ç¹æ®,ã å©ç¨ åè©,ããã å¶é åè©,ãããã ã ç¹æ®,ã ã å©è©,ã ãåç § åè©,ãããããã ãã ãã å©åè©,ãã ãã ã ç¹æ®,ã
ã¡ãªã¿ã« Mecab ã ã¨ãããªãã
æ¥æ¬èª åè©,ä¸è¬,*,*,*,*,æ¥æ¬èª,ããã³ã´,ããã³ã´ å½¢æ ç´ åè©,ä¸è¬,*,*,*,*,å½¢æ ç´ ,ã±ã¤ã¿ã¤ã½,ã±ã¤ã¿ã¤ã½ 解æ åè©,ãµå¤æ¥ç¶,*,*,*,*,解æ,ã«ã¤ã»ã,ã«ã¤ã»ã Web åè©,åºæåè©,çµç¹,*,*,*,* ãµã¼ãã¹ åè©,ãµå¤æ¥ç¶,*,*,*,*,ãµã¼ãã¹,ãµã¼ãã¹,ãµã¼ã㹠㯠å©è©,ä¿å©è©,*,*,*,*,ã¯,ã,㯠ã è¨å·,èªç¹,*,*,*,*,ã,ã,ã 24 åè©,æ°,*,*,*,*,* æé åè©,æ¥å°¾,å©æ°è©,*,*,*,æé,ã¸ã«ã³,ã¸ã«ã³ 以å åè©,éèªç«,å¯è©å¯è½,*,*,*,以å ,ã¤ãã¤,ã¤ã㤠㧠å©è©,æ ¼å©è©,ä¸è¬,*,*,*,ã§,ã,ã 1 åè©,æ°,*,*,*,*,* 㤠å©åè©,*,*,*,ä¸äºã»ã¿è¡,åºæ¬å½¢,ã¤,ã,ã ã® å©è©,é£ä½å,*,*,*,*,ã®,ã,ã IP åè©,åºæåè©,çµç¹,*,*,*,* ã¢ãã¬ã¹ åè©,ä¸è¬,*,*,*,*,ã¢ãã¬ã¹,ã¢ãã¬ã¹,ã¢ãã¬ã¹ ã« å©è©,æ ¼å©è©,ä¸è¬,*,*,*,ã«,ã,ã ã¤ã åè©,èªç«,*,*,äºæ®µã»ã«è¡ã¤é³ä¾¿,é£ç¨å½¢,ã¤ã,ãã,ãã 50000 åè©,æ°,*,*,*,*,* 件 åè©,æ¥å°¾,å©æ°è©,*,*,*,件,ã±ã³,ã±ã³ ã® å©è©,é£ä½å,*,*,*,*,ã®,ã,ã ãªã¯ã¨ã¹ã åè©,ä¸è¬,*,*,*,*,ãªã¯ã¨ã¹ã,ãªã¯ã¨ã¹ã,ãªã¯ã¨ã¹ã ã å©è©,æ ¼å©è©,ä¸è¬,*,*,*,ã,ã¬,㬠ä¸é åè©,ä¸è¬,*,*,*,*,ä¸é,ã¸ã§ã¦ã²ã³,ã¸ã§ã¼ã²ã³ 㨠å©è©,æ ¼å©è©,ä¸è¬,*,*,*,ã¨,ã,ã ãªã£ åè©,èªç«,*,*,äºæ®µã»ã©è¡,é£ç¨ã¿æ¥ç¶,ãªã,ãã,ãã 㦠å©è©,æ¥ç¶å©è©,*,*,*,*,ã¦,ã,ã ã åè©,éèªç«,*,*,ä¸æ®µ,é£ç¨å½¢,ãã,ã¤,㤠ã¾ã å©åè©,*,*,*,ç¹æ®ã»ãã¹,åºæ¬å½¢,ã¾ã,ãã¹,ãã¹ ã è¨å·,å¥ç¹,*,*,*,*,ã,ã,ã ã¾ã æ¥ç¶è©,*,*,*,*,*,ã¾ã,ãã¿,ãã¿ ã è¨å·,èªç¹,*,*,*,*,ã,ã,ã 1 åè©,æ°,*,*,*,*,* ãªã¯ã¨ã¹ã åè©,ä¸è¬,*,*,*,*,ãªã¯ã¨ã¹ã,ãªã¯ã¨ã¹ã,ãªã¯ã¨ã¹ã ã® å©è©,é£ä½å,*,*,*,*,ã®,ã,ã æ大 åè©,ä¸è¬,*,*,*,*,æ大,ãµã¤ãã¤,ãµã¤ã㤠ãµã¤ãº åè©,ä¸è¬,*,*,*,*,ãµã¤ãº,ãµã¤ãº,ãµã¤ãº ã å©è©,æ ¼å©è©,ä¸è¬,*,*,*,ã,ã²,ã² 100 åè©,æ°,*,*,*,*,* KB åè©,åºæåè©,çµç¹,*,*,*,* ã« å©è©,æ ¼å©è©,ä¸è¬,*,*,*,ã«,ã,ã å¶é åè©,ãµå¤æ¥ç¶,*,*,*,*,å¶é,ã»ã¤ã²ã³,ã»ã¤ã²ã³ ã åè©,èªç«,*,*,ãµå¤ã»ã¹ã«,é£ç¨å½¢,ãã,ã·,㷠㦠å©è©,æ¥ç¶å©è©,*,*,*,*,ã¦,ã,ã ã åè©,éèªç«,*,*,ä¸æ®µ,é£ç¨å½¢,ãã,ã¤,㤠ã¾ã å©åè©,*,*,*,ç¹æ®ã»ãã¹,åºæ¬å½¢,ã¾ã,ãã¹,ãã¹ ã è¨å·,å¥ç¹,*,*,*,*,ã,ã,ã 詳ãã 形容è©,èªç«,*,*,形容è©ã»ã¤æ®µ,é£ç¨ãæ¥ç¶,詳ãã,ã¯ã¯ã·ã¯,ã¯ã¯ã·ã¯ 㯠å©è©,ä¿å©è©,*,*,*,*,ã¯,ã,㯠ã è¨å·,æ¬å¼§é,*,*,*,*,ã,ã,ã å©ç¨ åè©,ãµå¤æ¥ç¶,*,*,*,*,å©ç¨,ãªã¨ã¦,ãªã¨ã¼ å¶é åè©,ãµå¤æ¥ç¶,*,*,*,*,å¶é,ã»ã¤ã²ã³,ã»ã¤ã²ã³ ã è¨å·,æ¬å¼§é,*,*,*,*,ã,ã,ã ã å©è©,æ ¼å©è©,ä¸è¬,*,*,*,ã,ã²,ã² ã æ¥é è©,åè©æ¥ç¶,*,*,*,*,ã,ã´,ã´ åç § åè©,ãµå¤æ¥ç¶,*,*,*,*,åç §,ãµã³ã·ã§ã¦,ãµã³ã·ã§ã¼ ãã ãã åè©,éèªç«,*,*,äºæ®µã»ã©è¡ç¹æ®,å½ä»¤ï½,ãã ãã,ã¯ããµã¤,ã¯ããµã¤ ã è¨å·,å¥ç¹,*,*,*,*,ã,ã,ã
æå¾ã®ã»ãã®ããåç §ãããYahoo ã§ã¯ããåç §ãã ã Mecab ã§ã¯
ã æ¥é è©,åè©æ¥ç¶ åç § åè©,ãµå¤æ¥ç¶
ã¨ãªãã®ãéããªâ¦â¦