{"id":214,"date":"2008-05-29T20:13:42","date_gmt":"2008-05-29T11:13:42","guid":{"rendered":"https:\/\/deskplate.net\/blog\/2008\/05\/29\/mecab-php-extension-module\/"},"modified":"2008-05-29T20:13:42","modified_gmt":"2008-05-29T11:13:42","slug":"mecab-php-extension-module","status":"publish","type":"post","link":"https:\/\/deskplate.net\/blog\/archives\/214","title":{"rendered":"MeCab PHP extension module"},"content":{"rendered":"<p>http:\/\/page2.xrea.jp\/#php_mecab<br \/>\n\u3053\u3053\u304b\u3089\u3000php_mecab-0.2.0.tgz \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<br \/>\ntar xvzf php_mecab-0.2.0.tgz<br \/>\ncd php_mecab-0.2.0<br \/>\n.\/configure &#8211;with-php-config=\/usr\/local\/bin\/php-config &#8211;with-mecab=\/usr\/bin\/mecab-config<br \/>\nmake<br \/>\nmake install<br \/>\nfind \/ -name mecab.so \u3067\u63a2\u3057\u3066\u307f\u308b<br \/>\n\u898b\u3064\u304b\u3063\u305f\u3068\u3053\u308d\u3067php.ini\u306b\u8ffd\u52a0<br \/>\nextension_dir=&#8221;\/usr\/local\/lib\/php\/extensions\/no-debug-non-zts-20060613\/&#8221;<br \/>\nextension=mecab.so<br \/>\nmecab.default_dicdir=&#8221;\/usr\/lib\/mecab\/dic\/ipadic&#8221;<br \/>\n\u3053\u3093\u306aphp\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c<br \/>\n<?php\n$options = array('-d', '\/var\/lib\/mecab\/dic\/ipadic');\n$t = new MeCab_Tagger($options);\n$str = '\u798f\u7530\u5185\u95a3\u306f\u9000\u9663\u305b\u3088';\nprint $t->parse($str);<br \/>\n?><br \/>\n#php \/home\/admin\/mec.php<br \/>\n\u798f      \u8350\u7b5d\u30fb\u30fb*,*,*,*,*<br \/>\n\u7530\u5185    \u30fb\u8345\u30fb\u583a\u30fb\u8345\u815f\u81b5*,*,*,*<br \/>\n\u95a3      \u3088\u30fb\u30fb\u30fb\u7b5d\u30fb\u30fb*,*,*,*,*<br \/>\n\u548c      \u30fb\u8345\u30fb\u583a\u30fb\u8345\u815f\u81b5*,*,*,*<br \/>\n\u72c4\u6097\u64e6  \u84d9\u30fb\u30fb\u30fb\u7b5d\u30fb\u30fb*,*,*,*,*<br \/>\nEOS<br \/>\n\u3053\u3093\u306a\u306e\u304c\u51fa\u3066\u304d\u305f\u3089OK<br \/>\nWarning: Module &#8216;mecab&#8217; already loaded in Unknown on line 0<br \/>\nWarning: MeCab_Tagger::__construct(): &#8216;\/var\/lib\/mecab\/dic\/ipadic&#8217; does not exist or is not readable in \/home\/admin\/mec.php on line 4<br \/>\nWarning: MeCab_Tagger::parse(): first argment seems invalid in \/home\/admin\/mec.php on line 6<br \/>\n\u3053\u3093\u306a\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u5834\u5408\u306fmecab\u306e\u8f9e\u66f8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3057\u3066\u56de\u907f\u3059\u308b<br \/>\n# ln -snf \/usr\/lib\/mecab\/dic\/ipadic\/ \/var\/lib\/mecab\/dic\/ipadic<\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/page2.xrea.jp<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7],"tags":[],"class_list":["post-214","post","type-post","status-publish","format-standard","hentry","category-linux","category-php"],"_links":{"self":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts\/214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/comments?post=214"}],"version-history":[{"count":0,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts\/214\/revisions"}],"wp:attachment":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/media?parent=214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/categories?post=214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/tags?post=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}