{"id":50806,"date":"2022-07-22T00:00:00","date_gmt":"2022-07-22T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/"},"modified":"2025-11-14T07:55:28","modified_gmt":"2025-11-14T15:55:28","slug":"detecting-fake-news-using-python-and-griddb","status":"publish","type":"post","link":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/","title":{"rendered":"Python\u3068GridDB\u306b\u3088\u308b\u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u306e\u691c\u51fa"},"content":{"rendered":"<p>\u3053\u306e\u3088\u3046\u306a\u8a18\u4e8b\u3092\u76ee\u306b\u3059\u308b\u305f\u3073\u306b\u3001\u79c1\u305f\u3061\u306f\u672c\u80fd\u7684\u306b\u300c\u4f55\u304b\u304a\u304b\u3057\u3044\u300d\u3068\u611f\u3058\u308b\u306e\u3067\u3059\u3002\u3042\u307e\u308a\u306b\u591a\u304f\u306e\u8a18\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u6b63\u3057\u3044\u3082\u306e\u3068\u9593\u9055\u3063\u305f\u3082\u306e\u3092\u9078\u5225\u3059\u308b\u306e\u306f\u4e0d\u53ef\u80fd\u306b\u8fd1\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u306f\u30012\u3064\u306e\u65b9\u6cd5\u3067\u4e3b\u5f35\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u7b2c1\u306b\u3001\u4e8b\u5b9f\u306b\u5bfe\u3059\u308b\u53cd\u8ad6\u30022\u3064\u76ee\u306f\u3001\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u8a00\u8a9e\u3067\u3059\u3002\u524d\u8005\u306f\u3001\u81ea\u52d5\u30af\u30a8\u30ea\u30b7\u30b9\u30c6\u30e0\u3068\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3078\u306e\u5b9f\u8cea\u7684\u306a\u691c\u7d22\u306b\u3088\u3063\u3066\u306e\u307f\u9054\u6210\u53ef\u80fd\u3067\u3059\u3002\u5f8c\u8005\u306f\u3001\u81ea\u7136\u8a00\u8a9e\u51e6\u7406\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3068\u305d\u308c\u306b\u7d9a\u304f\u6a5f\u68b0\u5b66\u7fd2\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306b\u3088\u3063\u3066\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u306e\u76ee\u7684\u306f\u3001\u30d5\u30a7\u30a4\u30af\u307e\u305f\u306f\u30ea\u30a2\u30eb\u3068\u30e9\u30d9\u30eb\u4ed8\u3051\u3055\u308c\u305f\u30cb\u30e5\u30fc\u30b9\u30c7\u30fc\u30bf\u3092\u30e2\u30c7\u30eb\u5316\u3059\u308b\u3053\u3068\u3067\u3059\u3002GridDB\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u3092\u62bd\u51fa\u3057\u3001\u6b21\u306b\u524d\u51e6\u7406\u306e\u30b9\u30c6\u30c3\u30d7\u3092\u5b9f\u884c\u3057\u3001\u6700\u5f8c\u306b\u6a5f\u68b0\u5b66\u7fd2\u30e2\u30c7\u30eb\u3092\u69cb\u7bc9\u3057\u307e\u3057\u3087\u3046\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>\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<\/li>\n<li>\u30e2\u30c7\u30eb\u306e\u8a55\u4fa1 <\/li>\n<li>\u307e\u3068\u3081<\/li>\n<\/ol>\n<h2>\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>Pandas<\/li>\n<li>NumPy<\/li>\n<li>Scikit-learn<\/li>\n<li>Matplotlib<\/li>\n<li>Seaborn<\/li>\n<li>Tensorflow<\/li>\n<li>Keras<\/li>\n<li>nltk<\/li>\n<li>re<\/li>\n<li>patoolib<\/li>\n<li>urllib<\/li>\n<li>griddb_python<\/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\u3001Pandas \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>1&#46; \u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u6982\u8981<\/h2>\n<p>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306f\u3001\u507d\u7269\u3068\u672c\u7269\u306e\u30cb\u30e5\u30fc\u30b9\u304c\u540c\u6570\u7a0b\u5ea6\u542b\u307e\u308c\u308b\u7d0440000\u8a18\u4e8b\u304b\u3089\u69cb\u6210\u3055\u308c\u307e\u3059\u3002\u307b\u3068\u3093\u3069\u306e\u30cb\u30e5\u30fc\u30b9\u306f\u7c73\u56fd\u306e\u65b0\u805e\u304b\u3089\u53ce\u96c6\u3055\u308c\u3001\u7c73\u56fd\u306e\u653f\u6cbb\u3001\u4e16\u754c\u30cb\u30e5\u30fc\u30b9\u3001\u30cb\u30e5\u30fc\u30b9\u306a\u3069\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.kaggle.com\/datasets\/clmentbisaillon\/fake-and-real-news-dataset\">https:\/\/www.kaggle.com\/datasets\/clmentbisaillon\/fake-and-real-news-dataset<\/a><\/p>\n<h2>2&#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\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nimport urllib.request\nimport patoolib\n\nimport nltk\nimport string\nfrom nltk.corpus import stopwords\nimport re\n\nimport tensorflow as tf\nfrom keras.preprocessing.text import Tokenizer\nfrom tensorflow.keras.utils import to_categorical\nfrom keras.preprocessing.sequence import pad_sequences\n\nfrom sklearn.metrics import classification_report,confusion_matrix,accuracy_score\nfrom sklearn.model_selection import train_test_split\n\nimport warnings\nwarnings.filterwarnings('ignore')\n%matplotlib inline<\/code><\/pre>\n<\/div>\n<h2>3&#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>3&#46;a GridDB\u3092\u5229\u7528\u3059\u308b<\/h3>\n<p>GridDB\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\u62e1\u5f35\u6027\u306e\u63d0\u4f9b\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\u62e1\u5f35\u6027\u306e\u9ad8\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u3042\u308b\u305f\u3081\u3001\u5b8c\u74a7\u306a\u4ee3\u66ff\u624b\u6bb5\u3068\u3057\u3066\u6a5f\u80fd\u3057\u307e\u3059\u3002GridDB\u306f\u3001\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u306a\u30a4\u30f3\u30e1\u30e2\u30ea\u578bNoSQL\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\u307f<\/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\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304c\u5b8c\u4e86\u3057\u3066\u3044\u308b\u3068\u4eee\u5b9a\u3057\u3066\u3001\u4eca\u5ea6\u306f\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30ed\u30fc\u30c9\u3059\u308b\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\">factory = griddb.StoreFactory.get_instance()\n\n# Initialize the GridDB container (enter your database credentials)\ntry:\n    gridstore = factory.get_store(host=host_name, port=your_port, \n            cluster_name=cluster_name, username=admin, \n            password=admin)\n\n    info = griddb.ContainerInfo(\"false_news\",\n                    [[\"title\", griddb.Type.STRING],[\"text\", griddb.Type.STRING],[\"subject\", griddb.Type.STRING],\n                     [\"date\", griddb.Type.TIMESTAMP],\n                    griddb.ContainerType.COLLECTION, True)\n    cont = gridstore.put_container(info) \n    data = pd.read_csv(\"False.csv\")\n    #Add data\n    for i in range(len(data)):\n        ret = cont.put(data.iloc[i, :])\n    print(\"Data added successfully\")\n                     \ntry:\n    gridstore = factory.get_store(host=host_name, port=your_port, \n            cluster_name=cluster_name, username=admin, \n            password=admin)\n\n    info = griddb.ContainerInfo(\"true_news\",\n                    [[\"title\", griddb.Type.STRING],[\"text\", griddb.Type.STRING],[\"subject\", griddb.Type.STRING],\n                     [\"date\", griddb.Type.TIMESTAMP],\n                    griddb.ContainerType.COLLECTION, True)\n    cont = gridstore.put_container(info) \n    data = pd.read_csv(\"True.csv\")\n    #Add data\n    for i in range(len(data)):\n        ret = cont.put(data.iloc[i, :])\n    print(\"Data added successfully\")<\/code><\/pre>\n<\/div>\n<p>pandas\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u63d0\u4f9b\u3059\u308bread_sql_query\u95a2\u6570\u306f\u3001\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092\u30d1\u30f3\u30c0\u306e\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u5909\u63db\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u4f5c\u696d\u3057\u3084\u3059\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">sql_statement1 = ('SELECT * FROM false_news')\nfalse = pd.read_sql_query(sql_statement, cont)<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">sql_statement2 = ('SELECT * FROM true_news')\ntrue = 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\u3066\u3044\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>credit_card_dataset<\/code> \u3092\u30b3\u30f3\u30c6\u30ca\u306e\u540d\u524d\u306b\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\u307f<\/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>3&#46;b pandas\u306eread_csv\u3092\u4f7f\u7528\u3059\u308b<\/h3>\n<p>\u307e\u305f\u3001Pandas\u306e <code>read_csv<\/code> \u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u3069\u3061\u3089\u306e\u65b9\u6cd5\u3092\u4f7f\u3063\u3066\u3082\u3001\u30c7\u30fc\u30bf\u306fpandas\u306edataframe\u306e\u5f62\u3067\u8aad\u307f\u8fbc\u307e\u308c\u308b\u306e\u3067\u3001\u4e0a\u8a18\u306e\u3069\u3061\u3089\u306e\u65b9\u6cd5\u3082\u540c\u3058\u51fa\u529b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">true = pd.read_csv(\"True.csv\")\nfalse = pd.read_csv(\"Fake.csv\")<\/code><\/pre>\n<\/div>\n<h2>4&#46; \u30c7\u30fc\u30bf\u30af\u30ea\u30fc\u30cb\u30f3\u30b0\u3068\u524d\u51e6\u7406<\/h2>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">true['label'] = 1\nfalse['label'] = 0<\/code><\/pre>\n<\/div>\n<p>2\u3064\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u30921\u3064\u306b\u307e\u3068\u3081\u3001\u30c6\u30ad\u30b9\u30c8\u3068\u30bf\u30a4\u30c8\u30eb\u30921\u3064\u306e\u30ab\u30e9\u30e0\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">news = pd.concat([true,false]) \nnews['text'] = news['text'] + \" \" + news['title']\ndf=news.drop([\"date\",\"title\",\"subject\"],axis=1)<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">sns.countplot(x=\"label\", data=news);\nplt.show()<\/code><\/pre>\n<\/div>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/06\/output_25_0.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/06\/output_25_0.png\" alt=\"\" width=\"402\" height=\"262\" class=\"aligncenter size-full wp-image-28326\" srcset=\"\/wp-content\/uploads\/2022\/06\/output_25_0.png 402w, \/wp-content\/uploads\/2022\/06\/output_25_0-300x196.png 300w, \/wp-content\/uploads\/2022\/06\/output_25_0-400x262.png 400w\" sizes=\"(max-width: 402px) 100vw, 402px\" \/><\/a><\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">df.head()<\/code><\/pre>\n<\/div>\n<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }<\/p>\n<p>    .dataframe tbody tr th {\n        vertical-align: top;\n    }<\/p>\n<p>    .dataframe thead th {\n        text-align: right;\n    }\n  <\/style>\n<table border=\"1\" class=\"dataframe\">\n<thead>\n<tr style=\"text-align: right;\">\n<th>\n        <\/th>\n<th>\n          text\n        <\/th>\n<th>\n          label\n        <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>\n          0\n        <\/th>\n<td>\n          WASHINGTON (Reuters) &#8211; The head of a conservat&#8230;\n        <\/td>\n<td>\n          1\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          1\n        <\/th>\n<td>\n          WASHINGTON (Reuters) &#8211; Transgender people will&#8230;\n        <\/td>\n<td>\n          1\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          2\n        <\/th>\n<td>\n          WASHINGTON (Reuters) &#8211; The special counsel inv&#8230;\n        <\/td>\n<td>\n          1\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          3\n        <\/th>\n<td>\n          WASHINGTON (Reuters) &#8211; Trump campaign adviser &#8230;\n        <\/td>\n<td>\n          1\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          4\n        <\/th>\n<td>\n          SEATTLE\/WASHINGTON (Reuters) &#8211; President Donal&#8230;\n        <\/td>\n<td>\n          1\n        <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u751f\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\uff08\u6587\u5b57\u306e\u5217\uff09\u3092\u30d9\u30af\u30c8\u30eb\uff08\u6570\u5b57\u306e\u5217\uff09\u306b\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u524d\u306b\u3001\u53e5\u8aad\u70b9\u3092\u524a\u9664\u3001\u6570\u5b57\u3092\u524a\u9664\u3001\u30bf\u30b0\u306e\u524a\u9664\u3001URL\u306e\u524a\u9664\u3001\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u306e\u524a\u9664\u3001\u30cb\u30e5\u30fc\u30b9\u306e\u5c0f\u6587\u5b57\u3078\u306e\u5909\u66f4\u3001Lemmatisation\u3068\u3044\u3063\u305f\u3053\u3068\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e4\u3064\u306e\u95a2\u6570\u306f\u3001\u53e5\u8aad\u70b9(&lt;,.&#8217;: \u306a\u3069)\u3001\u6570\u5b57\u3001\u30bf\u30b0\u3001URL\u306e\u524a\u9664\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">def rem_punctuation(text):\n  return text.translate(str.maketrans('','',string.punctuation))\n\ndef rem_numbers(text):\n  return re.sub('[0-9]+','',text)\n\n\ndef rem_urls(text):\n  return re.sub('https?:S+','',text)\n\n\ndef rem_tags(text):\n  return re.sub('&lt;.*?>',\" \",text)\n\ndf['text'].apply(rem_urls)\ndf['text'].apply(rem_punctuation)\ndf['text'].apply(rem_tags)\ndf['text'].apply(rem_numbers)<\/code><\/pre>\n<\/div>\n<pre><code>0        WASHINGTON (Reuters) - The head of a conservat...\n1        WASHINGTON (Reuters) - Transgender people will...\n2        WASHINGTON (Reuters) - The special counsel inv...\n3        WASHINGTON (Reuters) - Trump campaign adviser ...\n4        SEATTLE\/WASHINGTON (Reuters) - President Donal...\n                               ...                        \n23476    st Century Wire says As WIRE reported earlier ...\n23477    st Century Wire says It s a familiar theme. Wh...\n23478    Patrick Henningsen  st Century WireRemember wh...\n23479    st Century Wire says Al Jazeera America will g...\n23480    st Century Wire says As WIRE predicted in its ...\nName: text, Length: 44898, dtype: object\n<\/code><\/pre>\n<p>rem_stopwords() \u306f\u3001\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u3092\u524a\u9664\u3057\u3001\u5358\u8a9e\u3092\u5c0f\u6587\u5b57\u306b\u5909\u63db\u3059\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">stop = set(stopwords.words('english'))\n\ndef rem_stopwords(df_news):\n    \n    words = [ch for ch in df_news if ch not in stop]\n    words= \"\".join(words).split()\n    words= [words.lower() for words in df_news.split()]\n    \n    return words   \n\ndf['text'].apply(rem_stopwords)<\/code><\/pre>\n<\/div>\n<pre><code>0        [washington, (reuters), -, the, head, of, a, c...\n1        [washington, (reuters), -, transgender, people...\n2        [washington, (reuters), -, the, special, couns...\n3        [washington, (reuters), -, trump, campaign, ad...\n4        [seattle\/washington, (reuters), -, president, ...\n                               ...                        \n23476    [21st, century, wire, says, as, 21wire, report...\n23477    [21st, century, wire, says, it, s, a, familiar...\n23478    [patrick, henningsen, 21st, century, wireremem...\n23479    [21st, century, wire, says, al, jazeera, ameri...\n23480    [21st, century, wire, says, as, 21wire, predic...\nName: text, Length: 44898, dtype: object\n<\/code><\/pre>\n<p>Lemmatization\u306f\u3001\u5358\u8a9e\u306e\u8a9e\u5f59\u3068\u5f62\u614b\u7d20\u89e3\u6790\u3092\u884c\u3044\u3001\u901a\u5e38\u3001\u5c48\u6298\u8a9e\u5c3e\u306e\u307f\u3092\u9664\u53bb\u3059\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">from nltk.stem import WordNetLemmatizer\n#nltk.download('wordnet')\nlemmatizer = WordNetLemmatizer()\n\ndef lemmatize_words(text):\n  lemmas = []\n  for word in text.split():\n    lemmas.append(lemmatizer.lemmatize(word))\n  return \" \".join(lemmas)\n\ndf['text'].apply(lemmatize_words)<\/code><\/pre>\n<\/div>\n<pre><code>0        WASHINGTON (Reuters) - The head of a conservat...\n1        WASHINGTON (Reuters) - Transgender people will...\n2        WASHINGTON (Reuters) - The special counsel inv...\n3        WASHINGTON (Reuters) - Trump campaign adviser ...\n4        SEATTLE\/WASHINGTON (Reuters) - President Donal...\n                               ...                        \n23476    21st Century Wire say As 21WIRE reported earli...\n23477    21st Century Wire say It s a familiar theme. W...\n23478    Patrick Henningsen 21st Century WireRemember w...\n23479    21st Century Wire say Al Jazeera America will ...\n23480    21st Century Wire say As 21WIRE predicted in i...\nName: text, Length: 44898, dtype: object\n<\/code><\/pre>\n<p>\u30c8\u30fc\u30af\u30f3\u5316\u30fb\u30d1\u30c7\u30a3\u30f3\u30b0<\/p>\n<p>\u30c8\u30fc\u30af\u30f3\u5316\u3068\u306f\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u5358\u8a9e\u306b\u5206\u89e3\u3059\u308b\u51e6\u7406\u306e\u3053\u3068\u3067\u3059\u3002\u30c8\u30fc\u30af\u30f3\u5316\u306f\u3069\u306e\u6587\u5b57\u3067\u3082\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u6700\u3082\u4e00\u822c\u7684\u306a\u65b9\u6cd5\u306f\u30b9\u30da\u30fc\u30b9\u6587\u5b57\u3067\u884c\u3046\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p>\u5f53\u7136\u306a\u304c\u3089\u3001\u6587\u306e\u4e2d\u306b\u306f\u9577\u3044\u3082\u306e\u3084\u77ed\u3044\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u3053\u3067\u3001\u5165\u529b\u306e\u5927\u304d\u3055\u3092\u63c3\u3048\u308b\u305f\u3081\u306b\u3001\u30d1\u30c7\u30a3\u30f3\u30b0\u3092\u7528\u3044\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">x = df['text'].values\ny= df['label'].values<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">tokenizer = Tokenizer()\ntokenizer.fit_on_texts(x)\nword_to_index = tokenizer.word_index\nx = tokenizer.texts_to_sequences(x)<\/code><\/pre>\n<\/div>\n<p>\u3059\u3079\u3066\u306e\u30cb\u30e5\u30fc\u30b9\u3092250\u5b57\u4ee5\u5185\u306b\u53ce\u3081\u3001250\u5b57\u672a\u6e80\u306e\u30cb\u30e5\u30fc\u30b9\u306b\u306f\u30d1\u30c7\u30a3\u30f3\u30b0\u3092\u8ffd\u52a0\u3057\u3001\u9577\u3044\u3082\u306e\u306f\u5207\u308a\u6368\u3066\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">vocab_size =  len(word_to_index)\noov_tok = \"&lt;oov>\"\nmax_length = 250\nembedding_dim = 100&<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">x = pad_sequences(x, maxlen=max_length)<\/code><\/pre>\n<\/div>\n<h2>5&#46; \u6a5f\u68b0\u5b66\u7fd2\u30e2\u30c7\u30eb\u69cb\u7bc9<\/h2>\n<p>\u5358\u8a9e\u306e\u30d9\u30af\u30c8\u30eb\u5316\u306f\u3001\u8a9e\u5f59\u304b\u3089\u5358\u8a9e\u3084\u30d5\u30ec\u30fc\u30ba\u3092\u5b9f\u6570\u306e\u5bfe\u5fdc\u3059\u308b\u30d9\u30af\u30c8\u30eb\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3059\u308b\u81ea\u7136\u8a00\u8a9e\u51e6\u7406\u306b\u304a\u3051\u308b\u65b9\u6cd5\u8ad6\u3067\u3059\u3002\u30d9\u30af\u30c8\u30eb\u5316\u306b\u306f Bag of words\u3001TFIDF\u3001Word2Vec\u3001Glove\u306a\u3069\u306e\u4e8b\u524d\u5b66\u7fd2\u6e08\u307f\u306e\u624b\u6cd5\u306a\u3069\u3001\u69d8\u3005\u306a\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002Stanford\u3067\u958b\u767a\u3055\u308c\u305f\u5358\u8a9e\u306e\u30d9\u30af\u30c8\u30eb\u8868\u73fe\u3092\u5f97\u308b\u305f\u3081\u306bGloVe\u5b66\u7fd2\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>GloVe\u6cd5\u306f\u3001\u5171\u8d77\u884c\u5217\u304b\u3089\u5358\u8a9e\u9593\u306e\u610f\u5473\u7684\u95a2\u4fc2\u3092\u5c0e\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u3044\u3046\u91cd\u8981\u306a\u8003\u3048\u306b\u57fa\u3065\u3044\u3066\u69cb\u7bc9\u3055\u308c\u3066\u3044\u307e\u3059\u3002V\u500b\u306e\u5358\u8a9e\u304b\u3089\u306a\u308b\u30b3\u30fc\u30d1\u30b9\u304c\u3042\u308b\u3068\u304d\u3001\u5171\u8d77\u884c\u5217X\u306fV\u00d7V\u306e\u884c\u5217\u3068\u306a\u308a\u3001X_i\u306ei\u884cj\u5217\u306f\u5358\u8a9ei\u304c\u5358\u8a9ej\u3068\u4f55\u56de\u5171\u8d77\u3057\u3066\u3044\u308b\u304b\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u3001stanford\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u304b\u3089\u5b66\u7fd2\u6e08\u307f\u306e\u57cb\u3081\u8fbc\u307f\u30c7\u30fc\u30bf\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">urllib.request.urlretrieve('https:\/\/nlp.stanford.edu\/data\/glove.6B.zip','glove.6B.zip')<\/code><\/pre>\n<\/div>\n<pre><code>('glove.6B.zip', &lt;http.client.HTTPMessage at 0x21bf8cb57c0&gt;)\n<\/code><\/pre>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">patoolib.extract_archive('glove.6B.zip')<\/code><\/pre>\n<\/div>\n<pre><code>patool: Extracting glove.6B.zip ...\npatool: ... glove.6B.zip extracted to `glove.6B' (multiple files in root).\n\n\n'glove.6B'\n<\/code><\/pre>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">embeddings_index = {};\nwith open('glove.6B\/glove.6B.100d.txt', encoding='utf-8') as f:\n    for line in f:\n        values = line.split();\n        word = values[0];\n        coefs = np.asarray(values[1:], dtype='float32');\n        embeddings_index[word] = coefs;\n\nembeddings_matrix = np.zeros((vocab_size+1, embedding_dim));\nfor word, i in word_to_index.items():\n    embedding_vector = embeddings_index.get(word);\n    if embedding_vector is not None:\n        embeddings_matrix[i] = embedding_vector;<\/code><\/pre>\n<\/div>\n<p>\u57cb\u3081\u8fbc\u307f\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u305f\u5f8c\u3001\u305d\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092train\u3068test\u306b\u5206\u5272\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">from sklearn.model_selection import train_test_split\nX_train,X_test,y_train,y_test = train_test_split(x,y,test_size=0.20,random_state=1)<\/code><\/pre>\n<\/div>\n<p>LSTM\u30e2\u30c7\u30eb\u3092\u69cb\u7bc9\u3057\u5b66\u7fd2\u3057\u307e\u3059\u3002<\/p>\n<p>\u6ce8\u610f\u3059\u3079\u304d\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p>1) \u91cd\u307f\u306fGlove embeddings\u884c\u5217\u3068\u3057\u3066\u521d\u671f\u5316\u3057\u307e\u3057\u305f\u3002 2) 2\u3064\u306e\u30c9\u30ed\u30c3\u30d7\u30a2\u30a6\u30c8\u30ec\u30a4\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3001p=0.2\u3068\u3057\u3066\u3044\u307e\u3059\u3002 3) \u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u304c\u30d0\u30e9\u30f3\u30b9\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u7cbe\u5ea6\u3092\u6700\u9069\u5316\u3059\u308b\u305f\u3081\u306e\u6307\u6a19\u3092\u6301\u3064Adam\u3092\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u3068\u3057\u3066\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">model = tf.keras.Sequential([\n    tf.keras.layers.Embedding(vocab_size+1, embedding_dim, input_length=max_length, weights=[embeddings_matrix], trainable=False),\n    tf.keras.layers.LSTM(64,return_sequences=True),\n    tf.keras.layers.Dropout(0.2),\n    tf.keras.layers.LSTM(32),\n    tf.keras.layers.Dropout(0.2),\n    tf.keras.layers.Dense(24, activation='relu'),\n    tf.keras.layers.Dense(1, activation='sigmoid')\n])\nmodel.compile(loss='binary_crossentropy',optimizer='adam',metrics=['accuracy'])\nmodel.summary()<\/code><\/pre>\n<\/div>\n<pre><code>Model: \"sequential\"\n_________________________________________________________________\nLayer (type)                 Output Shape              Param #   \n=================================================================\nembedding (Embedding)        (None, 250, 100)          14770900  \n_________________________________________________________________\nlstm (LSTM)                  (None, 250, 64)           42240     \n_________________________________________________________________\ndropout (Dropout)            (None, 250, 64)           0         \n_________________________________________________________________\nlstm_1 (LSTM)                (None, 32)                12416     \n_________________________________________________________________\ndropout_1 (Dropout)          (None, 32)                0         \n_________________________________________________________________\ndense (Dense)                (None, 24)                792       \n_________________________________________________________________\ndense_1 (Dense)              (None, 1)                 25        \n=================================================================\nTotal params: 14,826,373\nTrainable params: 55,473\nNon-trainable params: 14,770,900\n_________________________________________________________________\n<\/code><\/pre>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">epochs = 6\nhistory = model.fit(X_train,y_train,epochs=epochs,validation_data=(X_test,y_test),batch_size=128)<\/code><\/pre>\n<\/div>\n<pre><code>Epoch 1\/6\n281\/281 [==============================] - 163s 570ms\/step - loss: 0.1676 - accuracy: 0.9386 - val_loss: 0.0807 - val_accuracy: 0.9713\nEpoch 2\/6\n281\/281 [==============================] - 168s 599ms\/step - loss: 0.0682 - accuracy: 0.9768 - val_loss: 0.0508 - val_accuracy: 0.9817\nEpoch 3\/6\n281\/281 [==============================] - 176s 625ms\/step - loss: 0.0377 - accuracy: 0.9882 - val_loss: 0.0452 - val_accuracy: 0.9837\nEpoch 4\/6\n281\/281 [==============================] - 179s 638ms\/step - loss: 0.0249 - accuracy: 0.9922 - val_loss: 0.0234 - val_accuracy: 0.9923\nEpoch 5\/6\n281\/281 [==============================] - 193s 689ms\/step - loss: 0.0157 - accuracy: 0.9950 - val_loss: 0.0189 - val_accuracy: 0.9948\nEpoch 6\/6\n281\/281 [==============================] - 170s 605ms\/step - loss: 0.0110 - accuracy: 0.9963 - val_loss: 0.0172 - val_accuracy: 0.9948\n<\/code><\/pre>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">epochs = [i for i in range(6)]\nfig , ax = plt.subplots(1,2)\ntrain_acc = history.history['accuracy']\ntrain_loss = history.history['loss']\nval_acc = history.history['val_accuracy']\nval_loss = history.history['val_loss']\nfig.set_size_inches(20,10)\n\nax[0].plot(epochs , train_acc , 'go-' , label = 'Training Accuracy')\nax[0].plot(epochs , val_acc , 'ro-' , label = 'Testing Accuracy')\nax[0].set_title('Training & Testing Accuracy')\nax[0].legend()\nax[0].set_xlabel(\"Epochs\")\nax[0].set_ylabel(\"Accuracy\")\n\nax[1].plot(epochs , train_loss , 'go-' , label = 'Training Loss')\nax[1].plot(epochs , val_loss , 'ro-' , label = 'Testing Loss')\nax[1].set_title('Training & Testing Loss')\nax[1].legend()\nax[1].set_xlabel(\"Epochs\")\nax[1].set_ylabel(\"Loss\")\nplt.show()<\/code><\/pre>\n<\/div>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/06\/output_52_0.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/06\/output_52_0.png\" alt=\"\" width=\"1173\" height=\"604\" class=\"aligncenter size-full wp-image-28327\" srcset=\"\/wp-content\/uploads\/2022\/06\/output_52_0.png 1173w, \/wp-content\/uploads\/2022\/06\/output_52_0-300x154.png 300w, \/wp-content\/uploads\/2022\/06\/output_52_0-1024x527.png 1024w, \/wp-content\/uploads\/2022\/06\/output_52_0-768x395.png 768w, \/wp-content\/uploads\/2022\/06\/output_52_0-600x309.png 600w\" sizes=\"(max-width: 1173px) 100vw, 1173px\" \/><\/a><\/p>\n<h2>6&#46; \u30e2\u30c7\u30eb\u306e\u8a55\u4fa1<\/h2>\n<p>\u6211\u3005\u306e\u30e2\u30c7\u30eb\u306f\u3001\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u304a\u3044\u306699.48%\u306e\u7cbe\u5ea6\u3067\u975e\u5e38\u306b\u826f\u597d\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">result = model.evaluate(X_test, y_test)\n# extract those\nloss = result[0]\naccuracy = result[1]\n\n\nprint(f\"[+] Accuracy: {accuracy*100:.2f}%\")<\/code><\/pre>\n<\/div>\n<pre><code>281\/281 [==============================] - 19s 69ms\/step - loss: 0.0172 - accuracy: 0.9948\n[+] Accuracy: 99.48%\n<\/code><\/pre>\n<p>\u307e\u305f\u3001\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u304a\u3051\u308b\u6211\u3005\u306e\u30e2\u30c7\u30eb\u306e\u7cbe\u5ea6\u3068\u518d\u73fe\u7387\u3092\u5206\u6790\u3059\u308b\u305f\u3081\u306b\u3001\u6df7\u540c\u884c\u5217\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e2\u30c7\u30eb\u8a55\u4fa1\u306e\u507d\u967d\u6027\u3068\u507d\u9670\u6027\u306b\u3064\u3044\u3066\u3001\u3088\u308a\u6df1\u3044\u6d1e\u5bdf\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">pred = model.predict_classes(X_test)\ncm = confusion_matrix(y_test,pred)\ncm = pd.DataFrame(cm , index = ['Fake','Real'] , columns = ['Fake','Real'])<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-python\">plt.figure(figsize = (10,10))\nsns.heatmap(cm,cmap= \"Accent\", linecolor = 'black' , linewidth = 1 , annot = True, fmt='' , xticklabels = ['Fake','Real'] , yticklabels = ['Fake','Real'])\nplt.xlabel(\"Predicted\")\nplt.ylabel(\"Actual\")<\/code><\/pre>\n<\/div>\n<pre><code>Text(69.0, 0.5, 'Actual')\n<\/code><\/pre>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/06\/output_58_1.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/06\/output_58_1.png\" alt=\"\" width=\"579\" height=\"589\" class=\"aligncenter size-full wp-image-28328\" srcset=\"\/wp-content\/uploads\/2022\/06\/output_58_1.png 579w, \/wp-content\/uploads\/2022\/06\/output_58_1-295x300.png 295w\" sizes=\"(max-width: 579px) 100vw, 579px\" \/><\/a><\/p>\n<h2>7&#46; \u7d50\u8ad6<\/h2>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001NLP\u306e\u6280\u8853\u3068GridDB\u3092\u4f7f\u7528\u3057\u3066\u3001\u975e\u5e38\u306b\u6b63\u78ba\u306a\u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u8b58\u5225\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) Pandas\u306e2\u3064\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\u3092\u6271\u3046\u5834\u5408\u3001\u30ce\u30fc\u30c8\u30d6\u30c3\u30af\u306b\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u8fbc\u3080\u305f\u3081\u306e\u512a\u308c\u305f\u9078\u629e\u80a2\u3068\u306a\u308a\u307e\u3059\u3002<a href=\"https:\/\/griddb.net\/ja\/downloads\/\">GridDB\u3092\u4eca\u3059\u3050\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a>\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u3088\u3046\u306a\u8a18\u4e8b\u3092\u76ee\u306b\u3059\u308b\u305f\u3073\u306b\u3001\u79c1\u305f\u3061\u306f\u672c\u80fd\u7684\u306b\u300c\u4f55\u304b\u304a\u304b\u3057\u3044\u300d\u3068\u611f\u3058\u308b\u306e\u3067\u3059\u3002\u3042\u307e\u308a\u306b\u591a\u304f\u306e\u8a18\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u6b63\u3057\u3044\u3082\u306e\u3068\u9593\u9055\u3063\u305f\u3082\u306e\u3092\u9078\u5225\u3059\u308b\u306e\u306f\u4e0d\u53ef\u80fd\u306b\u8fd1\u3044\u3067\u3057\u3087\u3046\u3002 \u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u306f\u30012\u3064\u306e\u65b9\u6cd5\u3067\u4e3b\u5f35\u3059\u308b\u3053\u3068\u304c\u3067 [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":50276,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50806","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\u306b\u3088\u308b\u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u306e\u691c\u51fa | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u3088\u3046\u306a\u8a18\u4e8b\u3092\u76ee\u306b\u3059\u308b\u305f\u3073\u306b\u3001\u79c1\u305f\u3061\u306f\u672c\u80fd\u7684\u306b\u300c\u4f55\u304b\u304a\u304b\u3057\u3044\u300d\u3068\u611f\u3058\u308b\u306e\u3067\u3059\u3002\u3042\u307e\u308a\u306b\u591a\u304f\u306e\u8a18\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u6b63\u3057\u3044\u3082\u306e\u3068\u9593\u9055\u3063\u305f\u3082\u306e\u3092\u9078\u5225\u3059\u308b\u306e\u306f\u4e0d\u53ef\u80fd\u306b\u8fd1\u3044\" \/>\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\/detecting-fake-news-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\u306b\u3088\u308b\u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u306e\u691c\u51fa | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u3088\u3046\u306a\u8a18\u4e8b\u3092\u76ee\u306b\u3059\u308b\u305f\u3073\u306b\u3001\u79c1\u305f\u3061\u306f\u672c\u80fd\u7684\u306b\u300c\u4f55\u304b\u304a\u304b\u3057\u3044\u300d\u3068\u611f\u3058\u308b\u306e\u3067\u3059\u3002\u3042\u307e\u308a\u306b\u591a\u304f\u306e\u8a18\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u6b63\u3057\u3044\u3082\u306e\u3068\u9593\u9055\u3063\u305f\u3082\u306e\u3092\u9078\u5225\u3059\u308b\u306e\u306f\u4e0d\u53ef\u80fd\u306b\u8fd1\u3044\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/detecting-fake-news-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-07-22T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T15:55:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/06\/GridDBblog.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1170\" \/>\n\t<meta property=\"og:image:height\" content=\"650\" \/>\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\/detecting-fake-news-using-python-and-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Python\u3068GridDB\u306b\u3088\u308b\u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u306e\u691c\u51fa\",\"datePublished\":\"2022-07-22T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:55:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/\"},\"wordCount\":152,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/06\/GridDBblog.jpg\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/\",\"url\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/\",\"name\":\"Python\u3068GridDB\u306b\u3088\u308b\u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u306e\u691c\u51fa | 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\/detecting-fake-news-using-python-and-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/06\/GridDBblog.jpg\",\"datePublished\":\"2022-07-22T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:55:28+00:00\",\"description\":\"\u3053\u306e\u3088\u3046\u306a\u8a18\u4e8b\u3092\u76ee\u306b\u3059\u308b\u305f\u3073\u306b\u3001\u79c1\u305f\u3061\u306f\u672c\u80fd\u7684\u306b\u300c\u4f55\u304b\u304a\u304b\u3057\u3044\u300d\u3068\u611f\u3058\u308b\u306e\u3067\u3059\u3002\u3042\u307e\u308a\u306b\u591a\u304f\u306e\u8a18\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u6b63\u3057\u3044\u3082\u306e\u3068\u9593\u9055\u3063\u305f\u3082\u306e\u3092\u9078\u5225\u3059\u308b\u306e\u306f\u4e0d\u53ef\u80fd\u306b\u8fd1\u3044\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2022\/06\/GridDBblog.jpg\",\"contentUrl\":\"\/wp-content\/uploads\/2022\/06\/GridDBblog.jpg\",\"width\":1170,\"height\":650},{\"@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\u306b\u3088\u308b\u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u306e\u691c\u51fa | GridDB: Open Source Time Series Database for IoT","description":"\u3053\u306e\u3088\u3046\u306a\u8a18\u4e8b\u3092\u76ee\u306b\u3059\u308b\u305f\u3073\u306b\u3001\u79c1\u305f\u3061\u306f\u672c\u80fd\u7684\u306b\u300c\u4f55\u304b\u304a\u304b\u3057\u3044\u300d\u3068\u611f\u3058\u308b\u306e\u3067\u3059\u3002\u3042\u307e\u308a\u306b\u591a\u304f\u306e\u8a18\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u6b63\u3057\u3044\u3082\u306e\u3068\u9593\u9055\u3063\u305f\u3082\u306e\u3092\u9078\u5225\u3059\u308b\u306e\u306f\u4e0d\u53ef\u80fd\u306b\u8fd1\u3044","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\/detecting-fake-news-using-python-and-griddb\/","og_locale":"ja_JP","og_type":"article","og_title":"Python\u3068GridDB\u306b\u3088\u308b\u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u306e\u691c\u51fa | GridDB: Open Source Time Series Database for IoT","og_description":"\u3053\u306e\u3088\u3046\u306a\u8a18\u4e8b\u3092\u76ee\u306b\u3059\u308b\u305f\u3073\u306b\u3001\u79c1\u305f\u3061\u306f\u672c\u80fd\u7684\u306b\u300c\u4f55\u304b\u304a\u304b\u3057\u3044\u300d\u3068\u611f\u3058\u308b\u306e\u3067\u3059\u3002\u3042\u307e\u308a\u306b\u591a\u304f\u306e\u8a18\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u6b63\u3057\u3044\u3082\u306e\u3068\u9593\u9055\u3063\u305f\u3082\u306e\u3092\u9078\u5225\u3059\u308b\u306e\u306f\u4e0d\u53ef\u80fd\u306b\u8fd1\u3044","og_url":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/detecting-fake-news-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-07-22T07:00:00+00:00","article_modified_time":"2025-11-14T15:55:28+00:00","og_image":[{"width":1170,"height":650,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2022\/06\/GridDBblog.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\/detecting-fake-news-using-python-and-griddb\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Python\u3068GridDB\u306b\u3088\u308b\u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u306e\u691c\u51fa","datePublished":"2022-07-22T07:00:00+00:00","dateModified":"2025-11-14T15:55:28+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/"},"wordCount":152,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/06\/GridDBblog.jpg","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/","url":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/","name":"Python\u3068GridDB\u306b\u3088\u308b\u30d5\u30a7\u30a4\u30af\u30cb\u30e5\u30fc\u30b9\u306e\u691c\u51fa | 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\/detecting-fake-news-using-python-and-griddb\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/06\/GridDBblog.jpg","datePublished":"2022-07-22T07:00:00+00:00","dateModified":"2025-11-14T15:55:28+00:00","description":"\u3053\u306e\u3088\u3046\u306a\u8a18\u4e8b\u3092\u76ee\u306b\u3059\u308b\u305f\u3073\u306b\u3001\u79c1\u305f\u3061\u306f\u672c\u80fd\u7684\u306b\u300c\u4f55\u304b\u304a\u304b\u3057\u3044\u300d\u3068\u611f\u3058\u308b\u306e\u3067\u3059\u3002\u3042\u307e\u308a\u306b\u591a\u304f\u306e\u8a18\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u6b63\u3057\u3044\u3082\u306e\u3068\u9593\u9055\u3063\u305f\u3082\u306e\u3092\u9078\u5225\u3059\u308b\u306e\u306f\u4e0d\u53ef\u80fd\u306b\u8fd1\u3044","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/detecting-fake-news-using-python-and-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2022\/06\/GridDBblog.jpg","contentUrl":"\/wp-content\/uploads\/2022\/06\/GridDBblog.jpg","width":1170,"height":650},{"@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\/50806","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=50806"}],"version-history":[{"count":1,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50806\/revisions"}],"predecessor-version":[{"id":51637,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50806\/revisions\/51637"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media\/50276"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media?parent=50806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/categories?post=50806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/tags?post=50806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}