{"id":3958,"date":"2019-06-26T00:54:00","date_gmt":"2019-06-25T15:54:00","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=3958"},"modified":"2023-09-15T03:29:19","modified_gmt":"2023-09-14T18:29:19","slug":"%e3%80%90php%e3%80%91mecab%e3%81%a7%e3%80%8c%e4%bc%bc%e3%81%a6%e3%81%84%e3%82%8b%e3%83%87%e3%83%bc%e3%82%bf%e3%80%8d%e3%82%92%e8%a6%8b%e3%81%a4%e3%81%91%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=3958","title":{"rendered":"\u3010PHP\u3011Mecab\u3067\u300c\u4f3c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u300d\u3092\u898b\u3064\u3051\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u56de\u3092\u9664\u304f\u3068\u6700\u8fd1\u516c\u958b\u3057\u305f\u8a18\u4e8b\u304c\u307b\u307c<code>Laravel<\/code>\u306e\u8a71\u984c\u304c\u3070\u304b\u308a\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u306b\u6c17\u304c\u3064\u304d\u307e\u3057\u305f\u3002<code>Laravel<\/code>\u306e\u8a71\u984c\u3063\u3066\u30db\u30f3\u30c8\u306b\u5c3d\u304d\u306a\u3044\u3067\u3059\u306d\ud83d\ude0a\u2728<\/p>\n<p>\u5e38\u3005\u601d\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u79c1\u306e\u958b\u767a\u74b0\u5883\u306f\u73fe\u5728\u30c9\u30c3\u30d7\u30ea<code>Laravel<\/code>\u5316\u3057\u3066\u3057\u307e\u3044\u3001\u6b63\u76f4\u306a\u3068\u3053\u308d\u30cd\u30a4\u30c6\u30a3\u30d6\u306a<code>PHP<\/code>\u30b3\u30fc\u30c9\u306e\u958b\u767a\u306f\u904e\u53bb\uff11\u5e74\u9593\u3067\u305f\u3063\u305f\u4e00\u56de\u3060\u3051\uff08\u3057\u304b\u3082\u53e4\u3044\u30b5\u30a4\u30c8\u306e\u79fb\u8ee2\u306e\u304a\u624b\u4f1d\u3044\uff09\u3060\u3063\u305f\u306e\u3067\u3001\u305f\u307e\u306b\u306f<code>PHP<\/code>\u5168\u822c\u306e\u8a71\u984c\u3082\u3001\u3068\u3044\u308d\u3044\u308d\u8003\u3048\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001\u307e\u3063\u3055\u304d\u306b\u601d\u3044\u6d6e\u304b\u3093\u3060\u306e\u304c\u65e5\u672c\u8a9e\u306b\u95a2\u9023\u3059\u308b\u8a71\u984c\u3067\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u306e\u3082<code>Laravel<\/code>\u3082\u3082\u3061\u308d\u3093\u591a\u8a00\u8a9e\u306b\u3044\u308d\u3044\u308d\u3068\u5bfe\u5fdc\u306f\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3055\u3059\u304c\u306b\u5358\u4e00\u56fd\u5bb6\u3060\u3051\u3067\u8a71\u3055\u308c\u3066\u3044\u308b\u65e5\u672c\u8a9e\u306e\u307f\u306b\u5bfe\u5fdc\u3059\u308b\u3068\u3044\u3046\u306e\u306f\u3042\u307e\u308a\u306a\u3044\u306f\u305a\u3060\u3068\u8003\u3048\u305f\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u3093\u306a\u5f71\u97ff\u3067\u4eca\u56de\u304a\u5c4a\u3051\u3059\u308b\u306e\u306f\u3001<\/p>\n<p><strong style=\"font-size: 35px;\">PHP\u3067\u300c\u4f3c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u300d\u3092\u898b\u3064\u3051\u51fa\u3059\u65b9\u6cd5<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u3057\u304b\u3082\u3001\u4eca\u56de\u306f\u8ab0\u3067\u3082\u30b7\u30f3\u30d7\u30eb\u306b\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u96e3\u89e3\u306a\u516c\u5f0f\u3084\u6a5f\u68b0\u5b66\u7fd2\u306a\u3069\u306f\u5168\u304f\u4f7f\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u306e\u304a\u5f79\u306b\u7acb\u3066\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2173 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24.png\" alt=\"\" width=\"300\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24-281x300.png 281w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>\u958b\u767a\u74b0\u5883\uff1aPHP 7.2\u3001Ubuntu 18.04\u3001nginx + php-fpm<\/p>\n<h1>\u4f3c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u3092\u898b\u3064\u3051\u308b\u4ed5\u7d44\u307f<\/h1>\n<p>\u4f8b\u3048\u3070\u3001\u5546\u54c1\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3084\u30d6\u30ed\u30b0\u306e\u3088\u3046\u306b\u8aac\u660e\u6587\u3084\u8a18\u4e8b\u304c\u30c7\u30fc\u30bf\u3068\u3057\u3066\u5b58\u5728\u3057\u3066\u3044\u308b\u3082\u306e\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u5c11\u3057\u9577\u3044\u6587\u7ae0\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u306e\u3082\u3001\u624b\u9806\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<ol>\n<li>\u3042\u308b\u30c7\u30fc\u30bf\u306e\u8aac\u660e\u6587\u304b\u3089\u300c\u5358\u8a9e\u300d\u3060\u3051\u3092\u53d6\u308a\u51fa\u3059<\/li>\n<li>\u53d6\u308a\u51fa\u3057\u305f\u5358\u8a9e\u304b\u3089\u610f\u5473\u306e\u306a\u3044\u3082\u306e\u306a\u3069\u4e0d\u8981\u306a\u3082\u306e\u3092\u6392\u9664\u3059\u308b<\/li>\n<li>\u6b8b\u3063\u305f\u5358\u8a9e\u3060\u3051\u3092\u96c6\u8a08\u3057\u3066\u6570\u304c\u591a\u3044\u3082\u306e\u304b\u3089\u4e26\u3079\u304b\u3048\u308b<\/li>\n<\/ol>\n<p>\u3053\u3046\u3059\u308b\u3053\u3068\u3067\u6700\u7d42\u7684\u306b\u305d\u306e\u30c7\u30fc\u30bf\u306b<strong>\u300c\u3088\u308a\u95a2\u9023\u5ea6\u304c\u9ad8\u3044\u300d\u5358\u8a9e\u3060\u3051\u304c\u53d6\u5f97\u3067\u304d\u308b<\/strong>\u306e\u3067\u3001\u3053\u308c\u3092\u30ad\u30fc\u30ef\u30fc\u30c9\u3068\u3057\u3066\u4ed6\u306e\u30c7\u30fc\u30bf\u3092\u691c\u7d22\u3059\u308c\u3070\u3001\u305d\u308c\u304c\u305d\u306e\u307e\u307e\u300c\u4f3c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u300d\u306b\u306a\u308b\u3068\u3044\u3046\u8a33\u3067\u3059\u306d\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u3053\u304b\u3089\u306f\u5b9f\u969b\u306b\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h1>\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h1>\n<h2>mecab\u672c\u4f53\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u65e5\u672c\u8a9e\u304b\u3089\u5358\u8a9e\u3060\u3051\u3092\u62bd\u51fa\u3059\u308b\u306b\u306f<a href=\"https:\/\/taku910.github.io\/mecab\/\" target=\"_blank\" rel=\"noopener noreferrer\">mecab<\/a>\u3068\u547c\u3070\u308c\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e \u5f62\u614b\u7d20\u89e3\u6790\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u307e\u305a\u3053\u306e<code>mecab<\/code>\u672c\u4f53\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4ee5\u4e0b\uff12\u3064\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>sudo apt install mecab\r\nsudo apt install libmecab-dev\r\n<\/strong><\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001<code>mecab<\/code>\u304c\u52d5\u304f\u304b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>mecab<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30c6\u30ad\u30b9\u30c8\u306e\u5165\u529b\u30e2\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u4f8b\u3048\u3070\u300c\u72ac\u3082\u6b69\u3051\u3070\u68d2\u306b\u5f53\u305f\u308b\u300d\u3068\u5165\u308c\u3066\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3960\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/mecab_1.png\" alt=\"\" width=\"357\" height=\"48\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/mecab_1.png 357w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/mecab_1-300x40.png 300w\" sizes=\"auto, (max-width: 357px) 100vw, 357px\" \/><\/p>\n<p>\u5b9f\u884c\u7d50\u679c\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<blockquote style=\"font-size: 14px;\"><p>\u72ac \u540d\u8a5e,\u666e\u901a\u540d\u8a5e,*,*,\u72ac,\u3044\u306c,\u4ee3\u8868\u8868\u8a18:\u72ac\/\u3044\u306c \u6f22\u5b57\u8aad\u307f:\u8a13 \u30ab\u30c6\u30b4\u30ea:\u52d5\u7269<br \/>\n\u3082 \u52a9\u8a5e,\u526f\u52a9\u8a5e,*,*,\u3082,\u3082,*<br \/>\n\u6b69\u3051\u3070 \u52d5\u8a5e,*,\u5b50\u97f3\u52d5\u8a5e\u30ab\u884c,\u57fa\u672c\u6761\u4ef6\u5f62,\u6b69\u304f,\u3042\u308b\u3051\u3070,\u4ee3\u8868\u8868\u8a18:\u6b69\u304f\/\u3042\u308b\u304f<br \/>\n\u68d2 \u540d\u8a5e,\u666e\u901a\u540d\u8a5e,*,*,\u68d2,\u307c\u3046,\u4ee3\u8868\u8868\u8a18:\u68d2\/\u307c\u3046 \u6f22\u5b57\u8aad\u307f:\u97f3 \u30ab\u30c6\u30b4\u30ea:\u4eba\u5de5\u7269-\u305d\u306e\u4ed6;\u5f62\u30fb\u6a21\u69d8<br \/>\n\u306b \u52a9\u8a5e,\u683c\u52a9\u8a5e,*,*,\u306b,\u306b,*<br \/>\n\u5f53\u305f\u308b \u52d5\u8a5e,*,\u5b50\u97f3\u52d5\u8a5e\u30e9\u884c,\u57fa\u672c\u5f62,\u5f53\u305f\u308b,\u3042\u305f\u308b,\u4ee3\u8868\u8868\u8a18:\u5f53\u305f\u308b\/\u3042\u305f\u308b \u81ea\u4ed6\u52d5\u8a5e:\u4ed6:\u5f53\u3066\u308b\/\u3042\u3066\u308b \u53cd\u7fa9:\u52d5\u8a5e:\u5916\u308c\u308b\/\u306f\u305a\u308c\u308b<\/p><\/blockquote>\n<p>\u3053\u306e\u3088\u3046\u306b\u65e5\u672c\u8a9e\u306e\u6587\u7ae0\u3092\u5358\u8a9e\uff08\u54c1\u8a5e\uff09\u3054\u3068\u306b\u5206\u3051\u3066\u304f\u308c\u308b\u306e\u3067\u3001\u3053\u306e\u9593\u516c\u958b\u3057\u305f\u8a18\u4e8b\u3001<a href=\"https:\/\/blog.capilano-fw.com\/?p=3843\">\u610f\u5916\u3068\u7c21\u5358\uff01Laravel \u3067\u5168\u6587\u691c\u7d22\u3092\u3064\u304f\u308b\uff08Laravel Scout + Algolia\uff09<\/a>\u3067\u3082\u5c11\u3057\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u5168\u6587\u691c\u7d22\u3092\u81ea\u524d\u3067\u4f5c\u308b\u3068\u304d\u306f\u3068\u3066\u3082\u91cd\u5b9d\u3057\u307e\u3059\u3002<\/p>\n<h2>php-mecab\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u7d9a\u3044\u3066<code>mecab<\/code>\u304c<code>PHP<\/code>\u304b\u3089\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2022.4.14\u3011<\/strong><br \/>\n<code>PHP<\/code>\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u65b0\u3057\u304f\u306a\u3063\u305f\u305f\u3081\u304b\u3001\u4ee5\u4e0b\u306e\u65b9\u6cd5\u3067\u306f<code>make<\/code>\u3059\u308b\u3068\u304d\u306b\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u5b9f\u884c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\uff08\u5b9f\u884c\u306f<code>PHP 8.0<\/code>\u3067\u3059\uff09\u3082\u3057\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u51fa\u6765\u306a\u3044\u5834\u5408\u306f <a href=\"#use_exec_function\" rel=\"noopener\"><strong>\u304a\u307e\u3051\uff1aexec()\u3067Mecab\u3092\u4f7f\u3046<\/strong><\/a> \u3092\u53c2\u7167\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001\u9069\u5f53\u306a\u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\u3057\u3066\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30b3\u30fc\u30c9\u3092\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>git clone https:\/\/github.com\/rsky\/php-mecab.git<\/strong><\/pre>\n<p>\u6b21\u306b\u30b3\u30d4\u30fc\u3057\u305f\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>cd php-mecab\/mecab<\/strong><\/pre>\n<p>\u79fb\u52d5\u3057\u305f\u3089<code>phpize<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3002<\/p>\n<pre><strong>phpize<\/strong><\/pre>\n<p>\u203b \u3082\u3057<code>phpize<\/code>\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u3048\u306a\u3044\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5148\u306b\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff08PHP\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u3063\u3066\u8aad\u307f\u304b\u3048\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<pre><strong>sudo apt install php7.2-dev<\/strong><\/pre>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2021.09.29\u3011<\/strong>\u3082\u3057 php-cli \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5909\u308f\u3089\u306a\u3044\u5834\u5408\u306f<code>sudo update-alternatives --set php \/usr\/bin\/php8.0<\/code>\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3042\u3068\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u9806\u306b\u5b9f\u884c\u3059\u308c\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>.\/configure<\/strong>\r\n<strong>make<\/strong>\r\n<strong>make test<\/strong>\r\n<strong>sudo make install<\/strong><\/pre>\n<p>\u203b \u9014\u4e2d<code>Do you want to send this report now?<\/code>\u3068\u805e\u304b\u308c\u305f\u3089\u30ec\u30dd\u30fc\u30c8\u3092\u9001\u4fe1\u3059\u308b\u304b\u3069\u3046\u304b\u306a\u306e\u3067\u304a\u597d\u307f\u3067\u6c7a\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3061\u306a\u307f\u306b\u3001\u79c1\u306f<code>n<\/code>\uff08No\uff09\u306b\u3057\u307e\u3057\u305f\ud83d\ude0a<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8868\u793a\u304c\u51fa\u307e\u3059\u3002<\/p>\n<pre><strong>Installing shared extensions:     \/usr\/lib\/php\/********\/<\/strong><\/pre>\n<p>\u3067\u306f\u3001<code>php-mecab<\/code>\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b<code>mecab.ini<\/code>\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4f5c\u6210\u3059\u308b\u5834\u6240\u306f\u3001<code>php_info()<\/code>\u3067\u8868\u793a\u3055\u308c\u308b\u300c<strong>Scan this dir for additional .ini files<\/strong>\u300d\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u30d5\u30a9\u30eb\u30c0\u304c\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3962\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/mecab_2.png\" alt=\"\" width=\"501\" height=\"323\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/mecab_2.png 501w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/mecab_2-300x193.png 300w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/p>\n<p><code>mecab.ini<\/code>\u306e\u4e2d\u8eab\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<pre><strong>extension=mecab.so<\/strong><\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067<code>nginx<\/code>\u3068<code>php-fpm<\/code>\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002\uff08\u3053\u308c\u3082\u74b0\u5883\u306b\u3088\u3063\u3066\u8aad\u307f\u304b\u3048\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<pre><strong>sudo systemctl restart nginx<\/strong>\r\n<strong>sudo systemctl restart php7.2-fpm<\/strong><\/pre>\n<p>\u305d\u3057\u3066\u3001\u518d\u5ea6<code>php_info()<\/code>\u3092\u518d\u8868\u793a\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>mecab<\/code>\u306e\u9805\u76ee\u304c\u51fa\u3066\u3044\u305f\u3089\u6210\u529f\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3963\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/mecab_3.png\" alt=\"\" width=\"972\" height=\"321\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/mecab_3.png 972w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/mecab_3-300x99.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/06\/mecab_3-768x254.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<h1>\u4f3c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u3092\u63a2\u3059\u30b3\u30fc\u30c9\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u6e96\u5099\u304c\u3067\u304d\u305f\u306e\u3067\u5b9f\u969b\u306b<code>PHP<\/code>\u306e\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br \/>\n\u307e\u305a\u306f\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre>$txt = '\uff08\u3053\u3053\u306b\u8aac\u660e\u6587\u306a\u3069\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\uff09';\r\n\r\n\/\/ mecab\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\r\n<strong>$mecab = new \\MeCab\\Tagger();<\/strong>\r\n<strong>$node = $mecab-&gt;parseToNode($txt);<\/strong>\r\n$tags = [];\r\n\r\nwhile($node) {\r\n\r\n    \/\/ mecab\u304b\u3089\u5404\u7a2e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\r\n    <strong>$stat = $node-&gt;getStat();<\/strong>\r\n<strong>    $features = explode(',', $node-&gt;getFeature());<\/strong>\r\n<strong>    $surface = $node-&gt;getSurface();<\/strong>\r\n\r\n    if ($stat === 0 &amp;&amp; \r\n        $features[0] === '\u540d\u8a5e' &amp;&amp; \r\n        $features[1] === '\u666e\u901a\u540d\u8a5e') {\r\n\r\n        <strong>$tags[] = $surface; \/\/ \u6761\u4ef6\u304c\u3042\u3048\u3070\u914d\u5217\u306b\u8ffd\u52a0<\/strong>\r\n\r\n    }\r\n\r\n    \/\/ \u6b21\u306e\u5358\u8a9e\u3078\u79fb\u52d5\r\n    $node = $node-&gt;getNext();\r\n}\r\n\r\n\/\/ \u30bf\u30b0\u3092\u96c6\u8a08\uff06\u4e26\u3079\u66ff\u3048\u3092\u3059\u308b\r\n<strong>$tag_counts = array_count_values($tags);<\/strong>\r\n<strong>$tag_counts = array_filter($tag_counts, function($value){<\/strong>\r\n\r\n<strong>    return ($value &gt;= 3);<\/strong>\r\n\r\n<strong>});<\/strong>\r\n<strong>arsort($tag_counts);\r\n<\/strong>\r\nprint_r($tag_counts);<\/pre>\n<p>\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001<code>mecab<\/code>\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3057\u3066\u3072\u3068\u3064\u305a\u3064\u5358\u8a9e\u3092\u5224\u5225\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u30eb\u30fc\u30d7\u306e\u4e2d\u3067\u306f\u3001\u307e\u305a\u5224\u5225\u306b\u5fc5\u8981\u306a\u4ee5\u4e0b\uff13\u3064\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>stat\u3000\u30fb\u30fb\u30fb\u30000\uff08\u30bc\u30ed\uff09\u304c\u5358\u8a9e\u30d6\u30ed\u30c3\u30af<\/li>\n<li>feature\u3000\u30fb\u30fb\u30fb\u3000\u5358\u8a9e\u306e\u54c1\u8a5e\u306a\u3069\u69d8\u3005\u306a\u60c5\u5831\u304c\u542b\u307e\u308c\u305f\u30c6\u30ad\u30b9\u30c8\uff08\u203b\uff11\uff09<\/li>\n<li>surface\u3000\u30fb\u30fb\u30fb\u3000\u5358\u8a9e\u672c\u4f53\u300c\u72ac\u300d\u300c\u68d2\u300d\u306a\u3069<\/li>\n<\/ul>\n<p>\uff08\u203b\uff11\uff09\u4f8b\u3048\u3070\u300c\u30c6\u30ad\u30b9\u30c8\u300d\u306e\u5834\u5408\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<blockquote><p>\u540d\u8a5e,\u666e\u901a\u540d\u8a5e,*,*,\u30c6\u30ad\u30b9\u30c8,\u3066\u304d\u3059\u3068,\u4ee3\u8868\u8868\u8a18:\u30c6\u30ad\u30b9\u30c8\/\u3066\u304d\u3059\u3068 \u30ab\u30c6\u30b4\u30ea:\u4eba\u5de5\u7269-\u305d\u306e\u4ed6;\u62bd\u8c61\u7269 \u30c9\u30e1\u30a4\u30f3:\u6559\u80b2\u30fb\u5b66\u7fd2;\u79d1\u5b66\u30fb\u6280\u8853<\/p><\/blockquote>\n<p>\uff13\u3064\u306e\u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u3067\u304d\u305f\u3089\u304a\u597d\u307f\u306e\u6761\u4ef6\u3067\u30d5\u30a3\u30eb\u30bf\u3092\u304b\u3051\u307e\u3059\u3002\u4eca\u56de\u306e\u6761\u4ef6\u306f\u3053\u3046\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>stat\u304c\u30bc\u30ed\u306e\u3082\u306e\uff08\u3064\u307e\u308a\u5358\u8a9e\u30d6\u30ed\u30c3\u30af\u3060\u3051\u3067\u3001\u4f59\u5206\u306a\u30d6\u30ed\u30c3\u30af\u306f\u7121\u8996\u3055\u308c\u307e\u3059\uff09<\/li>\n<li>$features\u306e\u4e00\u756a\u76ee\u3068\u4e8c\u756a\u76ee\u304c\u300c\u540d\u8a5e\u300d\u300c\u666e\u901a\u540d\u8a5e\u300d\u3067\u3042\u308b\u3053\u3068<\/li>\n<\/ol>\n<p>\u305d\u3057\u3066\u3001\u3053\u308c\u3089\u306e\u6761\u4ef6\u3092\u304f\u3050\u308a\u629c\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u305f\u3082\u306e\u3092\u3072\u3068\u3064\u305a\u3064\u914d\u5217\u306b\u8ffd\u52a0\u3057\u3066\u3044\u304f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u305d\u308c\u3089\u306e\u5358\u8a9e\u306e\u4e2d\u3067\u3082\u512a\u5148\u9806\u4f4d\u3092\u3064\u3051\u308b\u305f\u3081\u306b\u3001\u307e\u305a<code>array_count_values()<\/code>\u3067\u914d\u5217\u5185\u306e\u30c7\u30fc\u30bf\u3092\u30ab\u30a6\u30f3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u3057\u305f\u3082\u306e\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff08\u3064\u307e\u308a\u3001\u3053\u306e\u4e2d\u306e\u6570\u5b57\u306f\u914d\u5217\u306e\u4e2d\u306b\u540c\u3058\u5358\u8a9e\u304c\u4f55\u500b\u3042\u308b\u304b\u3092\u8868\u3057\u3066\u3044\u307e\u3059\uff09<\/p>\n<pre>Array\r\n    (\r\n        [\u500b\u4eba] =&gt; 1\r\n        [\u30d7\u30ed\u30b0\u30e9\u30e0] =&gt; 1\r\n        [\u8d77\u6e90] =&gt; 2\r\n        [\u81ea\u8eab] =&gt; 1\r\n        [\u30b5\u30a4\u30c8] =&gt; 1\r\n        [\u30da\u30fc\u30b8] =&gt; 2\r\n        [\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9] =&gt; 1<\/pre>\n<p>\u305d\u3057\u3066\u3001<code>array_filter()<\/code>\u3092\u4f7f\u3063\u3066\u300c\u4f55\u500b\u4ee5\u4e0a\u305d\u306e\u5358\u8a9e\u304c\u3042\u308c\u3070\u30bf\u30b0\u3068\u3057\u3066\u4f7f\u3046\u304b\u300d\u306e\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u304b\u3051\u3001\u3055\u3089\u306b<code>arsort()<\/code>\u3067\u500b\u6570\u304c\u591a\u3044\u9806\u306b\u914d\u5217\u3092\u4e26\u3079\u66ff\u3048\u3066\u6700\u7d42\u7684\u306b\u300c\u4f3c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u300d\u3092\u63a2\u3059\u305f\u3081\u306e\u30bf\u30b0\uff08\u30ad\u30fc\u30ef\u30fc\u30c9\uff09\u3068\u3057\u307e\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001<code>wikipedia<\/code>\u306e<a href=\"https:\/\/ja.wikipedia.org\/wiki\/PHP_(%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E8%A8%80%E8%AA%9E)\" target=\"_blank\" rel=\"noopener noreferrer\">PHP\u306e\u30da\u30fc\u30b8<\/a>\u306b\u3042\u308b\u300c\u6982\u8981\u300d\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u4f7f\u3063\u3066\u30bf\u30b0\u62bd\u51fa\u3057\u305f\u3082\u306e\u304c\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>Array\r\n(\r\n    [\u8a00\u8a9e] =&gt; 7\r\n    [\u30c4\u30fc\u30eb] =&gt; 4\r\n    [\u95a2\u6570] =&gt; 4\r\n    [\u6587\u5b57] =&gt; 3\r\n)<\/pre>\n<p>\u3042\u3068\u306f\u3001DB\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b<code>tags<\/code>\u306a\u3069\u3092\u8ffd\u52a0\u3057\u3066<code>json<\/code>\u3068\u3057\u3066\u3053\u308c\u3089\u306e\u30bf\u30b0\u3092\u4fdd\u5b58\u3057\u3066\u304a\u3051\u3070\u3001\u5f8c\u3067\u3044\u3064\u3067\u3082\u4f3c\u305f\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3067\u304d\u308b\u3068\u3044\u3046\u308f\u3051\u3067\u3059\u3002<\/p>\n<h1>\u3061\u306a\u307f\u306b &#8211; 1<\/h1>\n<p>\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u304b\u3051\u308b\u6761\u4ef6\u306b\u3088\u3063\u3066\u306f\u300c\u3053\u3068\u300d\u3084\u300c\u3082\u306e\u300d\u306a\u3069\u3042\u307e\u308a\u4f3c\u305f\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u5411\u304b\u306a\u3044\u30c7\u30fc\u30bf\u3082\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u6b21\u306e\u3088\u3046\u306b\u6f22\u5b57\u306e\u307f\u3092OK\u306b\u3057\u305f\u308a\u3001\u6587\u5b57\u304c\uff12\u6587\u5b57\u4ee5\u4e0a\u306e\u3082\u306e\u3060\u3051\u3067\u30d5\u30a3\u30eb\u30bf\u3092\u304b\u3051\u308b\u306a\u3069\u5de5\u592b\u3059\u308b\u3068\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<pre>if ($stat === 0 &amp;&amp;\r\n    $features[0] === '\u540d\u8a5e' &amp;&amp;\r\n    $features[1] === '\u666e\u901a\u540d\u8a5e' &amp;&amp;\r\n    <strong>preg_match('|^[\u4e00-\u9fa0]+$|u', $surface)<\/strong>) { \/\/ \u6f22\u5b57\u306e\u307f\uff08\u305f\u3060\u3057\u3001\u5168\u3066\u306e\u6f22\u5b57\u3092\u30ab\u30d0\u30fc\u3057\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u3067\u3059\uff09\r\n\r\n    $tags[] = $surface;\r\n\r\n}<\/pre>\n<h1>\u3061\u306a\u307f\u306b &#8211; 2<\/h1>\n<p>\u30db\u30f3\u30c8\u306b\u300c\u3061\u306a\u307f\u306b\u300d\u3067\u3059\u304c\u3001\u79c1\u304c\u904b\u55b6\u3057\u3066\u3044\u308b\u7121\u6599\u30d7\u30ec\u30b9\u30ea\u30ea\u30fc\u30b9\u30b5\u30a4\u30c8\u300c<a href=\"https:\/\/www.prerele.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u3077\u308c\u308a\u308a\u30fb\u30d7\u30ec\u30b9\u30ea\u30ea\u30fc\u30b9<\/a>\u300d\u3067\u3082\u4eca\u56de\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u5229\u7528\u3057\u3066\u95a2\u9023\u3059\u308b\u30d7\u30ec\u30b9\u30ea\u30ea\u30fc\u30b9\u3092\u81ea\u52d5\u7684\u306b\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3054\u8208\u5473\u306b\u3042\u308b\u65b9\u306f\u305c\u3072\u305d\u3061\u3089\u3082\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<h1 id=\"use_exec_function\">\u304a\u307e\u3051\uff1aexec()\u3067Mecab \u3092\u4f7f\u3046<\/h1>\n<p>\u8a18\u4e8b\u306e\u9014\u4e2d\u3067\u3082\u66f8\u304d\u307e\u3057\u305f\u304c\u3001<code>PHP 8.0<\/code>\u306e\u74b0\u5883\u3067\u5b9f\u884c\u3057\u3088\u3046\u3068\u3057\u305f\u3068\u3053\u308d\u3046\u307e\u304fPHP\u306e\u62e1\u5f35\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001<strong><a href=\"https:\/\/github.com\/rsky\/php-mecab\" target=\"_blank\" rel=\"noopener\">rsky\/php-mecab<\/a><\/strong> \u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u898b\u308b\u3068\u6700\u7d42\u66f4\u65b0\u3055\u308c\u305f\u306e\u306f 2015\u5e7412\u67086\u65e5 \u3068\u306e\u3053\u3068\u3067\u9577\u3044\u9593\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3057\u305f\u3002\uff082022.4.14 \u73fe\u5728\uff09<\/p>\n<p>\u305d\u3053\u3067\u3001\u304a\u307e\u3051\u3068\u3057\u3066\u62e1\u5f35\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u305b\u305a\u306b<code>Mecab<\/code>\u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5\u3092\u8ffd\u8a18\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u3067\u3059\u3002<\/p>\n<pre><strong>$extracting_text = '\u72ac\u3082\u6b69\u3051\u3070\u68d2\u306b\u5f53\u305f\u308b';\r\n\r\n$tags = [];\r\n\r\nexec('echo '. $extracting_text .' | mecab', $output);<\/strong>\r\n\r\n<strong>if(!empty($output) &amp;&amp; is_array($output)) {<\/strong>\r\n\r\n<strong>    $tags = collect($output)<\/strong>\r\n        <strong>-&gt;filter(function($item){\r\n\r\n            return $item !== 'EOS'; \/\/ EOS (End of Sentence) \u306f\u9664\u5916\r\n\r\n        })<\/strong>\r\n<strong>        -&gt;map(function($item) {<\/strong>\r\n\r\n<strong>            $lines = explode(\"\\t\", $item);<\/strong>\r\n<strong>            $surface = $lines[0];<\/strong>\r\n<strong>            $features = explode(',', $lines[1]);<\/strong>\r\n\r\n<strong>            return [<\/strong>\r\n<strong>                'surface' =&gt; $surface,<\/strong>\r\n<strong>                'features' =&gt; $features<\/strong>\r\n<strong>            ];<\/strong>\r\n\r\n<strong>        })<\/strong>\r\n<strong>        -&gt;filter(function($item) {<\/strong>\r\n\r\n<strong>            return data_get($item, 'features.0') === '\u540d\u8a5e';<\/strong>\r\n\r\n<strong>        })<\/strong>\r\n<strong>        -&gt;pluck('surface')<\/strong>\r\n<strong>        -&gt;toArray();<\/strong>\r\n\r\n<strong>}<\/strong>\r\n\r\n<strong>dd($tags);<\/strong><\/pre>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2023.9.12\u3011<\/strong>EOS\u304c\u5b58\u5728\u3059\u308b\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u306e\u3067 filter() \u90e8\u5206\u3092\u8ffd\u8a18\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3068\u3044\u3063\u3066\u3082\u3001<code>exec()<\/code>\u3067\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001\u8fd4\u3063\u3066\u304d\u305f\u4e2d\u8eab\u3092PHP\u3067\u52a0\u5de5\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059 \ud83d\ude04\ud83d\udc4d<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u77ed\u3044\u306a\u304c\u3089\u3082\u4e45\u3057\u3076\u308a\u306b\u7d14\u7c8b\u306aPHP\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u307e\u3057\u305f\u304c\u3001\u914d\u5217\u306b\u30d5\u30a3\u30eb\u30bf\u3092\u639b\u3051\u308b\u5834\u6240\u3067\u306fPHP\u306e\u6a19\u6e96\u95a2\u6570\u3088\u308a\u5148\u306bLaravel\u306e\u30d8\u30eb\u30d1\u30fc\u95a2\u6570\u306e\u65b9\u304c\u601d\u3044\u6d6e\u304b\u3093\u3067\u304f\u308b\u306e\u3067\u3001\u3084\u3063\u3071\u308aLaravel\u306b\u30c9\u30c3\u30d7\u30ea\u306f\u307e\u3063\u3061\u3083\u3063\u3066\u308b\u306e\u3092\u5b9f\u611f\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\ud83d\ude02<\/p>\n<p>\u305f\u3060\u3001\u4eca\u56de\u306e\u30b3\u30fc\u30c9\u306e\u4e2d\u3067<code>array_count_values()<\/code>\u306a\u3069\u306f\u3042\u307e\u308a\u99b4\u67d3\u307f\u306e\u306a\u3044\u95a2\u6570\u3067\u3057\u305f\u304c\u3001\u3068\u3066\u3082\u4fbf\u5229\u306a\u3082\u306e\u304c\u3042\u308b\u306e\u3060\u306a\u3068\u3082\u601d\u3044\u307e\u3057\u305f\u3002\uff08\u3057\u304b\u3082\u3053\u306e\u95a2\u6570\u306fPHP\uff14\u304b\u3089\u5b58\u5728\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002\u5168\u7136\u77e5\u3089\u306a\u304b\u3063\u305f\u3067\u3059\u30fb\u30fb\u30fb\uff09<\/p>\n<p>\u3082\u3057\u304b\u3059\u308b\u3068\u3001Laravel\u306e\u30d8\u30eb\u30d1\u30fc\u95a2\u6570\u3092\u4f7f\u308f\u306a\u304f\u3066\u3082\u5b9f\u884c\u3067\u304d\u308b\u4fbf\u5229\u306a\u95a2\u6570\u304cPHP\u306b\u306f\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u306e\u3042\u305f\u308a\u3082\u3067\u304d\u308b\u3060\u3051\u30ab\u30d0\u30fc\u3057\u3066\u3044\u304d\u305f\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u7686\u3055\u3093\u3082\u4e00\u5ea6<code>mecab<\/code>\u3067\u300c\u4f3c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u300d\u3092\u53d6\u5f97\u3057\u3066\u307f\u3066\u306f\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-519 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/05\/21.png\" alt=\"\" width=\"192\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/05\/21.png 192w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/05\/21-180x300.png 180w\" sizes=\"auto, (max-width: 192px) 100vw, 192px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u56de\u3092\u9664\u304f\u3068\u6700\u8fd1\u516c\u958b\u3057\u305f\u8a18\u4e8b\u304c\u307b\u307cLaravel\u306e\u8a71\u984c\u304c\u3070\u304b\u308a\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u306b\u6c17\u304c\u3064\u304d\u307e\u3057\u305f\u3002Laravel\u306e\u8a71\u984c\u3063\u3066\u30db\u30f3\u30c8\u306b\u5c3d\u304d\u306a\u3044\u3067\u3059\u306d\ud83d\ude0a\u2728 \u5e38 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=3958\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010PHP\u3011Mecab\u3067\u300c\u4f3c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u300d\u3092\u898b\u3064\u3051\u308b\u65b9\u6cd5&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":3966,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[154],"class_list":["post-3958","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-mecab"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/3958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3958"}],"version-history":[{"count":18,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/3958\/revisions"}],"predecessor-version":[{"id":12007,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/3958\/revisions\/12007"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/3966"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}