{"id":50791,"date":"2022-04-01T00:00:00","date_gmt":"2022-04-01T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/"},"modified":"2025-11-14T07:55:18","modified_gmt":"2025-11-14T15:55:18","slug":"multi-class-text-classification-using-python-and-griddb","status":"publish","type":"post","link":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/","title":{"rendered":"Python\u3068GridDB\u3092\u7528\u3044\u305f\u30de\u30eb\u30c1\u30af\u30e9\u30b9\u30c6\u30ad\u30b9\u30c8\u5206\u985e"},"content":{"rendered":"<p>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u306f\u3001\u65e5\u3005\u81a8\u5927\u306a\u91cf\u306e\u30cb\u30e5\u30fc\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u30bd\u30fc\u30b9\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u306b\u5bfe\u3059\u308b\u8981\u6c42\u3082\u9ad8\u307e\u308a\u7d9a\u3051\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u8208\u5473\u306e\u3042\u308b\u60c5\u5831\u306b\u7d20\u65e9\u304f\u3001\u52b9\u7387\u7684\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306a\u30cb\u30e5\u30fc\u30b9\u306e\u5206\u985e\u304c\u91cd\u8981\u3067\u3059\u3002\u30de\u30eb\u30c1\u30af\u30e9\u30b9\u30c6\u30ad\u30b9\u30c8\u5206\u985e\u306e\u30e2\u30c7\u30eb\u3092\u7528\u3044\u308b\u3053\u3068\u3067\u3001\u30e6\u30fc\u30b6\u306f\u3001\u8ffd\u8de1\u3055\u308c\u3066\u3044\u306a\u3044\u30cb\u30e5\u30fc\u30b9\u306e\u30c8\u30d4\u30c3\u30af\u3092\u7279\u5b9a\u3057\u305f\u308a\u3001\u4e8b\u524d\u306e\u8208\u5473\u306b\u57fa\u3065\u3044\u305f\u63a8\u85a6\u3092\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u305d\u3053\u3067\u3001\u30cb\u30e5\u30fc\u30b9\u306e\u898b\u51fa\u3057\u3068\u77ed\u3044\u8aac\u660e\u3092\u5165\u529b\u3068\u3057\u3001\u30cb\u30e5\u30fc\u30b9\u306e\u30ab\u30c6\u30b4\u30ea\u3092\u51fa\u529b\u3068\u3059\u308b\u30e2\u30c7\u30eb\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u3092\u76ee\u6307\u3057\u307e\u3059\u3002<\/p>\n<p>\u6211\u3005\u304c\u53d6\u308a\u7d44\u3080\u554f\u984c\u306f\u3001BBC\u30cb\u30e5\u30fc\u30b9\u306e\u8a18\u4e8b\u3068\u305d\u306e\u30ab\u30c6\u30b4\u30ea\u306e\u5206\u985e\u3067\u3059\u3002\u30c6\u30ad\u30b9\u30c8\u3092\u5165\u529b\u3068\u3057\u3066\u3001\u305d\u306e\u30ab\u30c6\u30b4\u30ea\u304c\u4f55\u306b\u306a\u308b\u304b\u3092\u4e88\u6e2c\u3057\u307e\u3059\u3002\u30ab\u30c6\u30b4\u30ea\u306b\u306f\u3001\u30d3\u30b8\u30cd\u30b9\u3001\u30a8\u30f3\u30bf\u30fc\u30c6\u30a4\u30e1\u30f3\u30c8\u3001\u653f\u6cbb\u3001\u30b9\u30dd\u30fc\u30c4\u3001\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u306e5\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u6982\u8981\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li>\u524d\u63d0\u6761\u4ef6\u3068\u74b0\u5883\u8a2d\u5b9a<\/li>\n<li>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u6982\u8981<\/li>\n<li>\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a4\u30f3\u30dd\u30fc\u30c8<\/li>\n<li>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u8aad\u307f\u8fbc\u307f<\/li>\n<li>\u30c7\u30fc\u30bf\u306e\u30af\u30ea\u30fc\u30cb\u30f3\u30b0\u3068\u524d\u51e6\u7406<\/li>\n<li>\u6a5f\u68b0\u5b66\u7fd2\u30e2\u30c7\u30eb\u306e\u69cb\u7bc9\u3068\u5b66\u7fd2<\/li>\n<li>\u307e\u3068\u3081<\/li>\n<\/ol>\n<h2>1&#46; \u524d\u63d0\u6761\u4ef6\u3068\u74b0\u5883\u8a2d\u5b9a<\/h2>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\u3001Windows \u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u4e0a\u306e Anaconda Navigator (Python \u30d0\u30fc\u30b8\u30e7\u30f3 &#8211; 3.8.3) \u3067\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u7d9a\u3051\u308b\u524d\u306b\u3001\u4ee5\u4e0b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\n<p>Pandas<\/p>\n<\/li>\n<li>\n<p>NumPy<\/p>\n<\/li>\n<li>\n<p>tensorflow<\/p>\n<\/li>\n<li>\n<p>nltk<\/p>\n<\/li>\n<li>\n<p>csv<\/p>\n<\/li>\n<li>\n<p>griddb_python<\/p>\n<\/li>\n<li>\n<p>matplotlib<\/p>\n<\/li>\n<\/ol>\n<p>\u3053\u308c\u3089\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f Conda \u306e\u4eee\u60f3\u74b0\u5883\u306b <code>conda install package-name<\/code> \u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u3084\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u304b\u3089\u76f4\u63a5Python\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001 <code>pip install package-name<\/code> \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>GridDB\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30ed\u30fc\u30c9\u3059\u308b\u969b\u306b\u3001GridDB \u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3068\u3001With\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u306e 2 \u7a2e\u985e\u3092\u53d6\u308a\u4e0a\u3052\u307e\u3059\u3002Python\u3092\u4f7f\u7528\u3057\u3066GridDB\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3082\u4e88\u3081\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li><a href=\"https:\/\/github.com\/griddb\/c_client\">GridDB C\u30af\u30e9\u30a4\u30a2\u30f3\u30c8<\/a><\/li>\n<li>SWIG (Simplified Wrapper and Interface Generator)<\/li>\n<li><a href=\"https:\/\/github.com\/griddb\/python_client\">GridDB Python\u30af\u30e9\u30a4\u30a2\u30f3\u30c8<\/a><\/li>\n<\/ol>\n<h2>2&#46; \u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u6982\u8981<\/h2>\n<p>\u30c6\u30ad\u30b9\u30c8\u6587\u66f8\u306f\u3001\u4f01\u696d\u306b\u3068\u3063\u3066\u6700\u3082\u8c4a\u5bcc\u306a\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u306e1\u3064\u3067\u3059\u3002<\/p>\n<p>BBC\u304c\u63d0\u4f9b\u3059\u308b2225\u306e\u8a18\u4e8b\u304b\u3089\u306a\u308b\u516c\u958b\u30c7\u30fc\u30bf\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u5404\u8a18\u4e8b\u306f\u3001\u30d3\u30b8\u30cd\u30b9\u3001\u30a8\u30f3\u30bf\u30fc\u30c6\u30a4\u30f3\u30e1\u30f3\u30c8\u3001\u653f\u6cbb\u3001\u30b9\u30dd\u30fc\u30c4\u3001\u6280\u8853\u3068\u3044\u30465\u3064\u306e\u30ab\u30c6\u30b4\u30ea\u306e\u3046\u3061\u306e1\u3064\u3067\u30e9\u30d9\u30eb\u4ed8\u3051\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u4f7f\u7528\u3057\u305f\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306f\u3001BBC News Raw Dataset\u3067\u3059\u3002\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306f\u3053\u3061\u3089(<code>http:\/\/mlg.ucd.ie\/datasets\/bbc.html<\/code>)\u304b\u3089\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h2>3&#46; \u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a4\u30f3\u30dd\u30fc\u30c8<\/h2>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">import griddb_python as griddb\nimport csv\nimport tensorflow as tf\nimport numpy as np\nimport pandas as pd\nfrom tensorflow.keras.preprocessing.sequence import pad_sequences\nfrom tensorflow.keras.preprocessing.text import Tokenizer\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Dense, Flatten, LSTM, Dropout, Activation, Embedding, Bidirectional\nimport nltk\nfrom nltk.corpus import stopwords\nimport matplotlib.pyplot as plt<\/code><\/pre>\n<\/div>\n<h2>4&#46; \u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u8aad\u307f\u8fbc\u307f<\/h2>\n<p>\u7d9a\u3051\u3066\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30ce\u30fc\u30c8\u30d6\u30c3\u30af\u306b\u30ed\u30fc\u30c9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>4&#46;a GridDB\u306e\u4f7f\u7528<\/h3>\n<p>GridDB\u2122\u306f\u3001IoT\u3084\u30d3\u30c3\u30b0\u30c7\u30fc\u30bf\u306b\u6700\u9069\u306a\u9ad8\u30b9\u30b1\u30fc\u30e9\u30d6\u30ebNoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u3059\u3002GridDB\u306e\u7406\u5ff5\u306e\u6839\u5e79\u306f\u3001IoT\u306b\u6700\u9069\u5316\u3055\u308c\u305f\u6c4e\u7528\u6027\u306e\u9ad8\u3044\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2\u306e\u63d0\u4f9b\u3001\u9ad8\u3044\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u3001\u9ad8\u6027\u80fd\u306a\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3001\u9ad8\u3044\u4fe1\u983c\u6027\u306e\u78ba\u4fdd\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u5834\u5408\u3001CSV\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u9762\u5012\u306a\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002GridDB\u306f\u3001\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u306a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u3057\u3066\u3001\u5b8c\u74a7\u306a\u4ee3\u66ff\u624b\u6bb5\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002GridDB\u306f\u3001\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u3067\u30a4\u30f3\u30e1\u30e2\u30ea\u306aNoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u7c21\u5358\u306b\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002GridDB\u3092\u521d\u3081\u3066\u4f7f\u3046\u5834\u5408\u306f\u3001<a href=\"https:\/\/griddb.net\/ja\/blog\/using-pandas-dataframes-with-griddb\/\">GridDB\u3078\u306e\u8aad\u307f\u66f8\u304d<\/a>\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u304c\u5f79\u306b\u7acb\u3061\u307e\u3059\u3002<\/p>\n<p>\u3059\u3067\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u304c\u6e08\u3093\u3067\u3044\u308b\u3068\u4eee\u5b9a\u3057\u3066\u3001\u4eca\u5ea6\u306f\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u305f\u3081\u306eSQL\u30af\u30a8\u30ea\u3092python\u3067\u66f8\u3044\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">sql_statement = ('SELECT * FROM bbc-text')\ndataset = pd.read_sql_query(sql_statement, cont)<\/code><\/pre>\n<\/div>\n<p>\u5909\u6570 <code>cont<\/code> \u306b\u306f\u3001\u30c7\u30fc\u30bf\u304c\u683c\u7d0d\u3055\u308c\u308b\u30b3\u30f3\u30c6\u30ca\u60c5\u5831\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<code>bbc-text<\/code> \u306f\u30b3\u30f3\u30c6\u30ca\u540d\u3067\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u8a73\u7d30\u306f\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb <a href=\"https:\/\/griddb.net\/ja\/blog\/using-pandas-dataframes-with-griddb\/\">GridDB\u3078\u306e\u8aad\u307f\u66f8\u304d<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>IoT\u3084\u30d3\u30c3\u30b0\u30c7\u30fc\u30bf\u306e\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u95a2\u3057\u3066\u8a00\u3048\u3070\u3001GridDB\u306f\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u3084NoSQL\u306e\u9818\u57df\u306e\u4ed6\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4e2d\u3067\u660e\u3089\u304b\u306b\u969b\u7acb\u3063\u3066\u3044\u307e\u3059\u3002\u5168\u4f53\u3068\u3057\u3066\u3001GridDB\u306f\u9ad8\u53ef\u7528\u6027\u3068\u30c7\u30fc\u30bf\u4fdd\u6301\u3092\u5fc5\u8981\u3068\u3059\u308b\u30df\u30c3\u30b7\u30e7\u30f3\u30af\u30ea\u30c6\u30a3\u30ab\u30eb\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306b\u3001\u8907\u6570\u306e\u4fe1\u983c\u6027\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>4&#46;b With\u6587\u306e\u4f7f\u7528<\/h3>\n<p>Python\u3067\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u305d\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306fopen()\u95a2\u6570\u3092\u7528\u3044\u3066\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002open\u306f\u30d5\u30a1\u30a4\u30eb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3057\u3001\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u958b\u304b\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3001\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u30e1\u30bd\u30c3\u30c9\u3068\u5c5e\u6027\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u4e0a\u8a18\u306e\u3069\u3061\u3089\u306e\u65b9\u6cd5\u3092\u4f7f\u3063\u3066\u3082\u3001pandas dataframe\u306e\u5f62\u3067\u30c7\u30fc\u30bf\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u306e\u3067\u3001\u540c\u3058\u51fa\u529b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>ntlk\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3001stopwords\u95a2\u6570\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u82f1\u8a9e\u306e\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u82f1\u8a9e\u306e\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u3001has, hasn&#8217;t, and, aren&#8217;t, because, each, during \u3067\u3059\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u3092\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u304c\u7406\u89e3\u3067\u304d\u308b\u3082\u306e\u306b\u5909\u63db\u3059\u308b\u4f5c\u696d\u3092\u300c\u524d\u51e6\u7406\u300d\u3068\u8a00\u3044\u307e\u3059\u3002\u524d\u51e6\u7406\u306e\u4ee3\u8868\u7684\u306a\u3082\u306e\u306f\u3001\u7121\u99c4\u306a\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u9664\u304f\u3053\u3068\u3067\u3059\u3002\u81ea\u7136\u8a00\u8a9e\u51e6\u7406\u3067\u306f\u3001\u7121\u99c4\u306a\u8a00\u8449\uff08\u30c7\u30fc\u30bf\uff09\u306e\u3053\u3068\u3092\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u3068\u547c\u3073\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u3068\u306f\u3001\u4e00\u822c\u7684\u306b\u3088\u304f\u4f7f\u308f\u308c\u308b\u5358\u8a9e\uff08\u300cthe\u300d\u3001\u300ca\u300d\u3001\u300can\u300d\u3001\u300cin\u300d\u306a\u3069\uff09\u3067\u3001\u691c\u7d22\u7528\u306b\u30a8\u30f3\u30c8\u30ea\u3092\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5316\u3059\u308b\u969b\u306b\u3082\u3001\u691c\u7d22\u30af\u30a8\u30ea\u306e\u7d50\u679c\u3068\u3057\u3066\u30a8\u30f3\u30c8\u30ea\u3092\u53d6\u308a\u51fa\u3059\u969b\u306b\u3082\u3001\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u304c\u7121\u8996\u3059\u308b\u3088\u3046\u30d7\u30ed\u30b0\u30e9\u30e0\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3067\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u5358\u8a9e\u304c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306e\u30b9\u30da\u30fc\u30b9\u3092\u5360\u6709\u3057\u305f\u308a\u3001\u8cb4\u91cd\u306a\u51e6\u7406\u6642\u9593\u3092\u596a\u3063\u305f\u308a\u3059\u308b\u3053\u3068\u306f\u907f\u3051\u305f\u3044\u3082\u306e\u3067\u3059\u3002\u3053\u306e\u305f\u3081\u3001\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u3068\u601d\u308f\u308c\u308b\u5358\u8a9e\u306e\u30ea\u30b9\u30c8\u3092\u4fdd\u5b58\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u7c21\u5358\u306b\u524a\u9664\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">nltk.download('stopwords')\nSTOPWORDS = set(stopwords.words('english'))<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">#We populate the list of articles and labels from the data and also remove the stopwords.\narticles = []\nlabels = []\n\nwith open(\"bbc-text.csv\", 'r') as csvfile:\n    reader = csv.reader(csvfile, delimiter=',')\n    next(reader)\n    for row in reader:\n        labels.append(row[0])\n        article = row[1]\n        for word in STOPWORDS:\n            token = ' ' + word + ' '\n            article = article.replace(token, ' ')\n            article = article.replace(' ', ' ')\n        articles.append(article)<\/code><\/pre>\n<\/div>\n<p>\u30e2\u30c7\u30eb\u306e\u69cb\u7bc9\u3068\u5b66\u7fd2\u306b\u5fc5\u8981\u306a\u30cf\u30a4\u30d1\u30fc\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">vocab_size = 5000 \nembedding_dim = 64\nmax_length = 200\ntrunc_type = 'post'\npadding_type = 'post'\noov_tok = '&lt;oov>' # OOV = Out of Vocabulary\ntraining_portion = 0.8&lt;\/oov><\/code><\/pre>\n<\/div>\n<p>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u304c\u8aad\u307f\u8fbc\u307e\u308c\u305f\u3089\u3001\u6b21\u306f\u305d\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u8abf\u3079\u3066\u307f\u307e\u3057\u3087\u3046\u3002head() \u95a2\u6570\u3092\u4f7f\u3063\u3066\u3001\u3053\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u6700\u521d\u306e 10 \u884c\u3092\u8868\u793a\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>5&#46; \u30c7\u30fc\u30bf\u306e\u30af\u30ea\u30fc\u30cb\u30f3\u30b0\u3068\u524d\u51e6\u7406<\/h2>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">articles[:1]<\/code><\/pre>\n<\/div>\n<pre><code>['tv future hands viewers home theatre systems  plasma high-definition tvs  digital video recorders moving living room  way people watch tv radically different five years  time.  according expert panel gathered annual consumer electronics show las vegas discuss new technologies impact one favourite pastimes. us leading trend  programmes content delivered viewers via home networks  cable  satellite  telecoms companies  broadband service providers front rooms portable devices.  one talked-about technologies ces digital personal video recorders (dvr pvr). set-top boxes  like us tivo uk sky+ system  allow people record  store  play  pause forward wind tv programmes want.  essentially  technology allows much personalised tv. also built-in high-definition tv sets  big business japan us  slower take europe lack high-definition programming. people forward wind adverts  also forget abiding network channel schedules  putting together a-la-carte entertainment. us networks cable satellite companies worried means terms advertising revenues well  brand identity  viewer loyalty channels. although us leads technology moment  also concern raised europe  particularly growing uptake services like sky+.  happens today  see nine months years  time uk   adam hume  bbc broadcast futurologist told bbc news website. likes bbc  issues lost advertising revenue yet. pressing issue moment commercial uk broadcasters  brand loyalty important everyone.  talking content brands rather network brands   said tim hanlon  brand communications firm starcom mediavest.  reality broadband connections  anybody producer content.  added:  challenge hard promote programme much choice.   means  said stacey jolna  senior vice president tv guide tv group  way people find content want watch simplified tv viewers. means networks  us terms  channels could take leaf google book search engine future  instead scheduler help people find want watch. kind channel model might work younger ipod generation used taking control gadgets play them. might suit everyone  panel recognised. older generations comfortable familiar schedules channel brands know getting. perhaps want much choice put hands  mr hanlon suggested.  end  kids diapers pushing buttons already - everything possible available   said mr hanlon.  ultimately  consumer tell market want.   50 000 new gadgets technologies showcased ces  many enhancing tv-watching experience. high-definition tv sets everywhere many new models lcd (liquid crystal display) tvs launched dvr capability built  instead external boxes. one example launched show humax 26-inch lcd tv 80-hour tivo dvr dvd recorder. one us biggest satellite tv companies  directtv  even launched branded dvr show 100-hours recording capability  instant replay  search function. set pause rewind tv 90 hours. microsoft chief bill gates announced pre-show keynote speech partnership tivo  called tivotogo  means people play recorded programmes windows pcs mobile devices. reflect increasing trend freeing multimedia people watch want  want.']\n<\/code><\/pre>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">labels[:1]<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">    ['tech']<\/code><\/pre>\n<\/div>\n<p>\u305d\u308c\u3067\u306f\u3001BBC\u306e\u516c\u958b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u3001\u6a5f\u68b0\u5b66\u7fd2\u30e2\u30c7\u30eb\u3092\u69cb\u7bc9\u3057\u3001\u8a55\u4fa1\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u307e\u305a\u3001\u30e2\u30c7\u30eb\u306e\u300c\u7279\u5fb4\u300d\u3068\u300c\u30e9\u30d9\u30eb\u300d\u3092\u4f5c\u6210\u3057\u3001\u8a13\u7df4\u7528\u3068\u30c6\u30b9\u30c8\u7528\u306e\u30b5\u30f3\u30d7\u30eb\u306b\u5206\u5272\u3057\u307e\u3059\u3002\u30c6\u30b9\u30c8\u30b5\u30f3\u30d7\u30eb\u306f\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u5168\u4f53\u306e20%\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30bb\u30c3\u30c8\u3068\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30bb\u30c3\u30c8\u306b\u5206\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u300280% (training_portion = .8) \u3092\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u7528\u306b\u3001\u6b8b\u308a\u306e20%\u3092\u691c\u8a3c\u7528\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">train_size = int(len(articles) * training_portion)\n\ntrain_articles = articles[0: train_size]\ntrain_labels = labels[0: train_size]\n\nvalidation_articles = articles[train_size:]\nvalidation_labels = labels[train_size:]<\/code><\/pre>\n<\/div>\n<h3>5&#46;a \u30c8\u30fc\u30af\u30f3\u5316<\/h3>\n<p>\u30c8\u30fc\u30af\u30f3\u5316\u306f num_words \u3092 vocab_size (5000) \u3068\u7b49\u3057\u304f\u3001oov_token \u3092 &#8216;<oov>&#8216; \u3068\u7b49\u3057\u304f\u8a2d\u5b9a\u3057\u307e\u3059\u3002train_articles\u3067\u306ffits_on_texts\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3070\u308c\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u5358\u8a9e\u306e\u983b\u5ea6\u3092\u7528\u3044\u3066\u8a9e\u5f59\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001&#8221;The cat sat on the mat. &#8221; \u3068\u3044\u3046\u4f8b\u3067\u306f\u3001{&#8216;<oov>&#8216;: 1, &#8216;cat&#8217;: 3, &#8216;mat&#8217;: 6, &#8216;on&#8217;: 5, &#8216;sat&#8217;: 4, &#8216;the&#8217;: 2} \u3068\u3044\u3046\u8f9e\u66f8\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">tokenizer = Tokenizer(num_words = vocab_size, oov_token=oov_tok)\ntokenizer.fit_on_texts(train_articles)\nword_index = tokenizer.word_index<\/code><\/pre>\n<\/div>\n<p>oov_token\u306f\u3001\u305d\u306e\u5358\u8a9e\u304c\u8f9e\u66f8\u306b\u8f09\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u306b\u5165\u308c\u308b\u5024 &#8216;<oov>&#8216; \u3067\u3059\u3002<\/p>\n<h3>5&#46;b \u30b7\u30fc\u30b1\u30f3\u30b9\u306b\u5909\u63db\u3059\u308b<\/h3>\n<p>\u30c8\u30fc\u30af\u30f3\u5316\u306e\u5f8c\u306b\u3001text_to_sequences\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001texts\u306e\u5404\u30c6\u30ad\u30b9\u30c8\u3092\u6574\u6570\u306e\u30b7\u30fc\u30b1\u30f3\u30b9\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u57fa\u672c\u7684\u306b\u3001\u30c6\u30ad\u30b9\u30c8\u5185\u306e\u5404\u5358\u8a9e\u3092\u53d6\u308a\u51fa\u3057\u3001\u8f9e\u66f8 tokenizer.word_index \u306b\u3042\u308b\u5bfe\u5fdc\u3059\u308b\u6574\u6570\u5024\u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002\u305d\u306e\u5358\u8a9e\u304c\u8f9e\u66f8\u306b\u306a\u3044\u5834\u5408\u306f\u3001\u5024\u3068\u3057\u30661\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">train_sequences = tokenizer.texts_to_sequences(train_articles)<\/code><\/pre>\n<\/div>\n<h3>5&#46;c \u914d\u5217\u306e\u5207\u308a\u6368\u3066\u3068\u30d1\u30c7\u30a3\u30f3\u30b0<\/h3>\n<p>\u81ea\u7136\u8a00\u8a9e\u51e6\u7406\u306e\u305f\u3081\u306b\u5b66\u7fd2\u3055\u305b\u308b\u5834\u5408\u3001\u305d\u308c\u3089\u306e\u914d\u5217\u3092\u540c\u3058\u5927\u304d\u3055\uff08\u5177\u4f53\u7684\u306a\u5f62\uff09\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3059\u3079\u3066\u306e\u914d\u5217\u304c\u540c\u3058\u30b5\u30a4\u30ba\u306b\u306a\u308b\u3088\u3046\u306b\u3001\u30d1\u30c7\u30a3\u30f3\u30b0\u3092\u4f7f\u3044\u3001\u5207\u308a\u6368\u3066\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">train_padded = pad_sequences(train_sequences, maxlen=max_length, padding=padding_type, truncating=trunc_type)<\/code><\/pre>\n<\/div>\n<p>train_articles\u3068validation_articles\u306b\u5bfe\u3057\u3066\u3001\u30c8\u30fc\u30af\u30f3\u5316\u3001\u30b7\u30fc\u30b1\u30f3\u30b9\u3078\u306e\u5909\u63db\u3001padding\/truncating\u3092\u9069\u7528\u3059\u308b\u4e88\u5b9a\u3067\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">tokenizer = Tokenizer(num_words = vocab_size, oov_token=oov_tok)\ntokenizer.fit_on_texts(train_articles)\nword_index = tokenizer.word_index\n\ntrain_sequences = tokenizer.texts_to_sequences(train_articles)\ntrain_padded = pad_sequences(train_sequences, maxlen=max_length, padding=padding_type, truncating=trunc_type)\n\nvalidation_sequences = tokenizer.texts_to_sequences(validation_articles)\nvalidation_padded = pad_sequences(validation_sequences, maxlen=max_length, padding=padding_type, truncating=trunc_type)<\/code><\/pre>\n<\/div>\n<p>\u524d\u56de\u540c\u69d8\u3001\u3053\u3053\u3067\u3082\u6a5f\u80fd\u3084\u8a18\u4e8b\u306e\u5834\u5408\u3068\u540c\u3058\u3053\u3068\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30e2\u30c7\u30eb\u306f\u5358\u8a9e\u3092\u7406\u89e3\u3057\u306a\u3044\u306e\u3067\u3001\u30e9\u30d9\u30eb\u3092\u6570\u5b57\u306b\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5148\u307b\u3069\u3068\u540c\u3058\u3088\u3046\u306b\u30c8\u30fc\u30af\u30f3\u5316\u3057\u3001\u30b7\u30fc\u30b1\u30f3\u30b9\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u30c8\u30fc\u30af\u30f3\u5316\u306e\u969b\u3001vocab size\u3068oov_token\u306f\u6307\u793a\u3057\u307e\u305b\u3093\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">label_tokenizer = Tokenizer()\nlabel_tokenizer.fit_on_texts(labels)\n\ntraining_label_seq = np.array(label_tokenizer.texts_to_sequences(train_labels))\nvalidation_label_seq = np.array(label_tokenizer.texts_to_sequences(validation_labels))<\/code><\/pre>\n<\/div>\n<h2>6&#46; \u6a5f\u68b0\u5b66\u7fd2\u30e2\u30c7\u30eb\u306e\u69cb\u7bc9<\/h2>\n<p>\u3053\u308c\u3067\u30cb\u30e5\u30fc\u30e9\u30eb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3059\u308b\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002\u30e2\u30c7\u30eb\u306e\u69cb\u9020\u306f\u4ee5\u4e0b\u306e\u5c64\u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">model = Sequential()\n\nmodel.add(Embedding(vocab_size, embedding_dim))\nmodel.add(Dropout(0.5))\nmodel.add(Bidirectional(LSTM(embedding_dim)))\nmodel.add(Dense(6, activation='softmax'))\n\nmodel.summary()<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">    Model: \"sequential\"\n    _________________________________________________________________\n    Layer (type)                 Output Shape              Param #   \n    =================================================================\n    embedding (Embedding)        (None, None, 64)          320000    \n    _________________________________________________________________\n    dropout (Dropout)            (None, None, 64)          0         \n    _________________________________________________________________\n    bidirectional (Bidirectional (None, 128)               66048     \n    _________________________________________________________________\n    dense (Dense)                (None, 6)                 774       \n    =================================================================\n    Total params: 386,822\n    Trainable params: 386,822\n    Non-trainable params: 0\n    _________________________________________________________________<\/code><\/pre>\n<\/div>\n<p>\u305d\u3057\u3066\u3001\u30e9\u30d9\u30eb\u3092 One-Hot \u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3057\u306a\u304b\u3063\u305f\u306e\u3067\u3001loss \u3092 sparse_categorical_crossentropy \u306b\u3057\u3066\u5b66\u7fd2\u30d7\u30ed\u30bb\u30b9\u3092\u69cb\u6210\u3059\u308b\u305f\u3081\u306b\u30e2\u30c7\u30eb\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u3002\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306fAdam\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">opt = tf.keras.optimizers.Adam(learning_rate=0.001, decay=1e-6)\nmodel.compile(loss='sparse_categorical_crossentropy', optimizer=opt, metrics=['accuracy'])<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">num_epochs = 12\nhistory = model.fit(train_padded, training_label_seq, epochs=num_epochs, validation_data=(validation_padded, validation_label_seq), verbose=2)<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">    Epoch 1\/12\n    56\/56 - 8s - loss: 1.6055 - accuracy: 0.2949 - val_loss: 1.4597 - val_accuracy: 0.3191\n    Epoch 2\/12\n    56\/56 - 5s - loss: 1.0623 - accuracy: 0.5854 - val_loss: 0.7767 - val_accuracy: 0.8000\n    Epoch 3\/12\n    56\/56 - 5s - loss: 0.6153 - accuracy: 0.7989 - val_loss: 0.7209 - val_accuracy: 0.7910\n    Epoch 4\/12\n    56\/56 - 5s - loss: 0.3402 - accuracy: 0.9101 - val_loss: 0.5048 - val_accuracy: 0.8135\n    Epoch 5\/12\n    56\/56 - 6s - loss: 0.1731 - accuracy: 0.9685 - val_loss: 0.1699 - val_accuracy: 0.9618\n    Epoch 6\/12\n    56\/56 - 6s - loss: 0.0448 - accuracy: 0.9955 - val_loss: 0.1592 - val_accuracy: 0.9663\n    Epoch 7\/12\n    56\/56 - 6s - loss: 0.0333 - accuracy: 0.9966 - val_loss: 0.1428 - val_accuracy: 0.9663\n    Epoch 8\/12\n    56\/56 - 5s - loss: 0.0400 - accuracy: 0.9927 - val_loss: 0.1245 - val_accuracy: 0.9685\n    Epoch 9\/12\n    56\/56 - 6s - loss: 0.0178 - accuracy: 0.9972 - val_loss: 0.1179 - val_accuracy: 0.9685\n    Epoch 10\/12\n    56\/56 - 5s - loss: 0.0135 - accuracy: 0.9972 - val_loss: 0.1557 - val_accuracy: 0.9573\n    Epoch 11\/12\n    56\/56 - 5s - loss: 0.0264 - accuracy: 0.9983 - val_loss: 0.1193 - val_accuracy: 0.9685\n    Epoch 12\/12\n    56\/56 - 6s - loss: 0.0102 - accuracy: 0.9994 - val_loss: 0.1306 - val_accuracy: 0.9663<\/code><\/pre>\n<\/div>\n<p>\u7cbe\u5ea6\u3068\u640d\u5931\u306e\u5c65\u6b74\u3092\u30d7\u30ed\u30c3\u30c8\u3057\u3001\u30aa\u30fc\u30d0\u30fc\u30d5\u30a3\u30c3\u30c6\u30a3\u30f3\u30b0\u304c\u8d77\u304d\u3066\u3044\u306a\u3044\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">def plot_graphs(history, string):\n  plt.plot(history.history[string])\n  plt.plot(history.history['val_'+string])\n  plt.xlabel(\"Epoch Count\")\n  plt.ylabel(string)\n  plt.legend([string, 'val_'+string])\n  plt.show()\n  \nplot_graphs(history, \"accuracy\")\nplot_graphs(history, \"loss\")<\/code><\/pre>\n<\/div>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/output_49_0.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/output_49_0.png\" alt=\"\" width=\"386\" height=\"262\" class=\"aligncenter size-full wp-image-28135\" srcset=\"\/wp-content\/uploads\/2022\/03\/output_49_0.png 386w, \/wp-content\/uploads\/2022\/03\/output_49_0-300x204.png 300w\" sizes=\"(max-width: 386px) 100vw, 386px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/output_49_1.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/output_49_1.png\" alt=\"\" width=\"386\" height=\"262\" class=\"aligncenter size-full wp-image-28136\" srcset=\"\/wp-content\/uploads\/2022\/03\/output_49_1.png 386w, \/wp-content\/uploads\/2022\/03\/output_49_1-300x204.png 300w\" sizes=\"(max-width: 386px) 100vw, 386px\" \/><\/a><\/p>\n<p>\u6700\u5f8c\u306bpredict()\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u3001\u30b5\u30f3\u30d7\u30eb\u30c6\u30ad\u30b9\u30c8\u306b\u5bfe\u3057\u3066\u4e88\u6e2c\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">txt = [\"Only bonds issued by the Russian government can be traded as part of a phased re-opening of the market. The exchange closed hours after Russian President Vladimir Putin sent thousands of troops into Ukraine on 24 February.Andrei Braginsky, a spokesman for the Moscow Exchange, said he hoped that trading in stocks would be able to start again soon. Technically everything is ready, and we are hoping this will resume in the near future, he said.\"]\n\nseq = tokenizer.texts_to_sequences(txt)\npadded = pad_sequences(seq, maxlen=max_length)\npred = model.predict(padded)\nlabels = ['sport', 'bussiness', 'politics', 'tech', 'entertainment'] \n\nprint(pred)\nprint(np.argmax(pred))\nprint(labels[np.argmax(pred)-1])<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">    [[2.6411068e-04 2.1545513e-02 9.6170175e-01 7.2104726e-03 1.0733245e-03\n      8.2047796e-03]]\n    2\n    bussiness<\/code><\/pre>\n<\/div>\n<h2>7&#46; \u307e\u3068\u3081<\/h2>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001BBC\u30cb\u30e5\u30fc\u30b9\u306e\u8a18\u4e8b\u306e\u30ab\u30c6\u30b4\u30ea\u3092\u4e88\u6e2c\u3059\u308b\u305f\u3081\u306b\u3001LSTM\u3092\u7528\u3044\u3066\u30c6\u30ad\u30b9\u30c8\u5206\u985e\u30e2\u30c7\u30eb\u3092\u69cb\u7bc9\u3057\u307e\u3057\u305f\u3002\u30c7\u30fc\u30bf\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u65b9\u6cd5\u3068\u3057\u3066\u3001(1)GridDB\u3068(2)With\u6587\u306e2\u3064\u306e\u65b9\u6cd5\u3092\u691c\u8a0e\u3057\u307e\u3057\u305f\u3002GridDB\u306f\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u62e1\u5f35\u6027\u304c\u9ad8\u3044\u305f\u3081\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u5834\u5408\u3001\u30ce\u30fc\u30c8\u30d6\u30c3\u30af\u306b\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u8fbc\u3080\u305f\u3081\u306e\u512a\u308c\u305f\u4ee3\u66ff\u624b\u6bb5\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u4eca\u3059\u3050<a href=\"https:\/\/griddb.net\/ja\/downloads\/\">GridDB\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a>\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u306f\u3001\u65e5\u3005\u81a8\u5927\u306a\u91cf\u306e\u30cb\u30e5\u30fc\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u30bd\u30fc\u30b9\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u306b\u5bfe\u3059\u308b\u8981\u6c42\u3082\u9ad8\u307e\u308a\u7d9a\u3051\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u8208\u5473\u306e\u3042\u308b\u60c5\u5831\u306b\u7d20\u65e9\u304f\u3001\u52b9\u7387\u7684\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306a\u30cb\u30e5\u30fc\u30b9\u306e\u5206\u985e\u304c\u91cd\u8981\u3067\u3059\u3002\u30de\u30eb\u30c1 [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":49383,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50791","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1005"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python\u3068GridDB\u3092\u7528\u3044\u305f\u30de\u30eb\u30c1\u30af\u30e9\u30b9\u30c6\u30ad\u30b9\u30c8\u5206\u985e | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u306f\u3001\u65e5\u3005\u81a8\u5927\u306a\u91cf\u306e\u30cb\u30e5\u30fc\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u30bd\u30fc\u30b9\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u306b\u5bfe\u3059\u308b\u8981\u6c42\u3082\u9ad8\u307e\u308a\u7d9a\u3051\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u8208\u5473\u306e\u3042\u308b\u60c5\u5831\u306b\u7d20\u65e9\u304f\u3001\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/multi-class-text-classification-using-python-and-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python\u3068GridDB\u3092\u7528\u3044\u305f\u30de\u30eb\u30c1\u30af\u30e9\u30b9\u30c6\u30ad\u30b9\u30c8\u5206\u985e | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u306f\u3001\u65e5\u3005\u81a8\u5927\u306a\u91cf\u306e\u30cb\u30e5\u30fc\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u30bd\u30fc\u30b9\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u306b\u5bfe\u3059\u308b\u8981\u6c42\u3082\u9ad8\u307e\u308a\u7d9a\u3051\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u8208\u5473\u306e\u3042\u308b\u60c5\u5831\u306b\u7d20\u65e9\u304f\u3001\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/multi-class-text-classification-using-python-and-griddb\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-01T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T15:55:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/silence-word-magnified_2560x1696.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1696\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"griddb-admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"7\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Python\u3068GridDB\u3092\u7528\u3044\u305f\u30de\u30eb\u30c1\u30af\u30e9\u30b9\u30c6\u30ad\u30b9\u30c8\u5206\u985e\",\"datePublished\":\"2022-04-01T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:55:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/\"},\"wordCount\":141,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/03\/silence-word-magnified_2560x1696.jpg\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/\",\"url\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/\",\"name\":\"Python\u3068GridDB\u3092\u7528\u3044\u305f\u30de\u30eb\u30c1\u30af\u30e9\u30b9\u30c6\u30ad\u30b9\u30c8\u5206\u985e | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/03\/silence-word-magnified_2560x1696.jpg\",\"datePublished\":\"2022-04-01T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:55:18+00:00\",\"description\":\"\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u306f\u3001\u65e5\u3005\u81a8\u5927\u306a\u91cf\u306e\u30cb\u30e5\u30fc\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u30bd\u30fc\u30b9\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u306b\u5bfe\u3059\u308b\u8981\u6c42\u3082\u9ad8\u307e\u308a\u7d9a\u3051\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u8208\u5473\u306e\u3042\u308b\u60c5\u5831\u306b\u7d20\u65e9\u304f\u3001\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2022\/03\/silence-word-magnified_2560x1696.jpg\",\"contentUrl\":\"\/wp-content\/uploads\/2022\/03\/silence-word-magnified_2560x1696.jpg\",\"width\":2560,\"height\":1696},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"caption\":\"griddb-admin\"},\"url\":\"https:\/\/griddb.net\/ja\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python\u3068GridDB\u3092\u7528\u3044\u305f\u30de\u30eb\u30c1\u30af\u30e9\u30b9\u30c6\u30ad\u30b9\u30c8\u5206\u985e | GridDB: Open Source Time Series Database for IoT","description":"\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u306f\u3001\u65e5\u3005\u81a8\u5927\u306a\u91cf\u306e\u30cb\u30e5\u30fc\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u30bd\u30fc\u30b9\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u306b\u5bfe\u3059\u308b\u8981\u6c42\u3082\u9ad8\u307e\u308a\u7d9a\u3051\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u8208\u5473\u306e\u3042\u308b\u60c5\u5831\u306b\u7d20\u65e9\u304f\u3001","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/multi-class-text-classification-using-python-and-griddb\/","og_locale":"ja_JP","og_type":"article","og_title":"Python\u3068GridDB\u3092\u7528\u3044\u305f\u30de\u30eb\u30c1\u30af\u30e9\u30b9\u30c6\u30ad\u30b9\u30c8\u5206\u985e | GridDB: Open Source Time Series Database for IoT","og_description":"\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u306f\u3001\u65e5\u3005\u81a8\u5927\u306a\u91cf\u306e\u30cb\u30e5\u30fc\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u30bd\u30fc\u30b9\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u306b\u5bfe\u3059\u308b\u8981\u6c42\u3082\u9ad8\u307e\u308a\u7d9a\u3051\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u8208\u5473\u306e\u3042\u308b\u60c5\u5831\u306b\u7d20\u65e9\u304f\u3001","og_url":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/multi-class-text-classification-using-python-and-griddb\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2022-04-01T07:00:00+00:00","article_modified_time":"2025-11-14T15:55:18+00:00","og_image":[{"width":2560,"height":1696,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2022\/03\/silence-word-magnified_2560x1696.jpg","type":"image\/jpeg"}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"\u57f7\u7b46\u8005":"griddb-admin","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"7\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Python\u3068GridDB\u3092\u7528\u3044\u305f\u30de\u30eb\u30c1\u30af\u30e9\u30b9\u30c6\u30ad\u30b9\u30c8\u5206\u985e","datePublished":"2022-04-01T07:00:00+00:00","dateModified":"2025-11-14T15:55:18+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/"},"wordCount":141,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/03\/silence-word-magnified_2560x1696.jpg","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/","url":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/","name":"Python\u3068GridDB\u3092\u7528\u3044\u305f\u30de\u30eb\u30c1\u30af\u30e9\u30b9\u30c6\u30ad\u30b9\u30c8\u5206\u985e | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/03\/silence-word-magnified_2560x1696.jpg","datePublished":"2022-04-01T07:00:00+00:00","dateModified":"2025-11-14T15:55:18+00:00","description":"\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u306f\u3001\u65e5\u3005\u81a8\u5927\u306a\u91cf\u306e\u30cb\u30e5\u30fc\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u30bd\u30fc\u30b9\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u306b\u5bfe\u3059\u308b\u8981\u6c42\u3082\u9ad8\u307e\u308a\u7d9a\u3051\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u8208\u5473\u306e\u3042\u308b\u60c5\u5831\u306b\u7d20\u65e9\u304f\u3001","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/multi-class-text-classification-using-python-and-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2022\/03\/silence-word-magnified_2560x1696.jpg","contentUrl":"\/wp-content\/uploads\/2022\/03\/silence-word-magnified_2560x1696.jpg","width":2560,"height":1696},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","caption":"griddb-admin"},"url":"https:\/\/griddb.net\/ja\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/comments?post=50791"}],"version-history":[{"count":1,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50791\/revisions"}],"predecessor-version":[{"id":51624,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50791\/revisions\/51624"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media\/49383"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media?parent=50791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/categories?post=50791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/tags?post=50791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}