{"id":50763,"date":"2021-09-01T00:00:00","date_gmt":"2021-09-01T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/"},"modified":"2025-11-14T07:54:53","modified_gmt":"2025-11-14T15:54:53","slug":"movie-review-classification-using-nlp-griddb-and-python","status":"publish","type":"post","link":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/","title":{"rendered":"NLP\u3001GridDB\u3001Python\u3092\u7528\u3044\u305f\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u306e\u5206\u985e"},"content":{"rendered":"<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001NLP\u30e2\u30c7\u30eb\u3092\u4f7f\u3063\u3066\u3001\u611f\u60c5\u5206\u6790\u306b\u57fa\u3065\u3044\u3066\u6620\u753b\u306e\u30ec\u30d3\u30e5\u30fc\u3092\u5206\u985e\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d9\u30fc\u30b9\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u3001Allen NLP\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u4e8b\u524d\u5b66\u7fd2\u6e08\u307fLSTM\u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u6982\u8981\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li>\u74b0\u5883\u3092\u8a2d\u5b9a\u3059\u308b<\/li>\n<li>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u3064\u3044\u3066<\/li>\n<li>\u30c7\u30fc\u30bf\u306e\u524d\u51e6\u7406\u3092\u884c\u3046<\/li>\n<li>Allen NLP\u30e2\u30c7\u30eb\u3092\u30ed\u30fc\u30c9\u3059\u308b<\/li>\n<li>\u4e88\u6e2c\u3092\u7acb\u3066\u308b<\/li>\n<li>\u7d50\u679c\u3092\u8a55\u4fa1\u3059\u308b<\/li>\n<\/ol>\n<p>\u3053\u306eJupyter\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u3053\u3061\u3089\u306e<a href=\"https:\/\/github.com\/griddbnet\/Blogs\/blob\/main\/Movie%20Review%20Classification%20Using%20NLP%2C%20GridDB%2C%20and%20Python\/Movie%20Review%20classification%20using%20NLP%2C%20GridDB%20and%20Python.ipynb\">GitHub Page<\/a>\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u74b0\u5883\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\u3001Jupyter Notebooks (Anaconda version 4.8.3)\u3068 Python version 3.8 \u3092\u4f7f\u7528\u3057\u3066\u3001Windows 10 \u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u4e0a\u3067\u884c\u308f\u308c\u307e\u3059\u3002\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u9032\u3081\u308b\u524d\u306b\u3001\u4ee5\u4e0b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ol>\n<li><a href=\"https:\/\/pandas.pydata.org\/docs\/getting_started\/install.html\">Pandas<\/a><\/li>\n<li><a href=\"https:\/\/pypi.org\/project\/allennlp\/\">allennlp<\/a><\/li>\n<li><a href=\"https:\/\/pypi.org\/project\/allennlp-models\/\">allennlp-models<\/a><\/li>\n<li><a href=\"https:\/\/pypi.org\/project\/nltk\/\">nltk<\/a><\/li>\n<li><a href=\"https:\/\/pypi.org\/project\/scikit-learn\/\">scikit-learn<\/a><\/li>\n<\/ol>\n<p><code>pip<\/code>\u307e\u305f\u306f<code>conda<\/code>\u3092\u7528\u3044\u3066\u4e0a\u8a18\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067<code>pip install package-name<\/code> \u307e\u305f\u306f <code>conda install package-name<\/code> \u3068\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Python\u3067<a href=\"https:\/\/github.com\/griddb\/python_client\">GridDB\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b<\/a>\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>GridDB C-client<\/li>\n<li>SWIG (Simplified Wrapper and Interface Generator)<\/li>\n<li>GridDB Python-client<\/li>\n<\/ol>\n<h2>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u3064\u3044\u3066<\/h2>\n<p><a href=\"https:\/\/www.kaggle.com\/columbine\/imdb-dataset-sentiment-analysis-in-csv-format\/version\/1\">Kaggle<\/a>\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308bIMDB\u611f\u60c5\u5206\u6790\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u5f62\u5f0f\u306f\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u3067\u3001\u6b21\u306e2\u3064\u306e\u5c5e\u6027\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>Movie Review (string)<\/li>\n<li>Sentiment Label (int) &#8211; Binary<\/li>\n<\/ol>\n<p>\u30e9\u30d9\u30eb&#8217;0&#8217;\u306f\u5426\u5b9a\u7684\u306a\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u3092\u8868\u3057\u3001&#8217;1&#8217;\u306f\u80af\u5b9a\u7684\u306a\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u3092\u8868\u3057\u307e\u3059\u3002\u4eca\u56de\u306f\u4e8b\u524d\u306b\u5b66\u7fd2\u3055\u308c\u305f\u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u3001\u5b66\u7fd2\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3068\u691c\u8a3c\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30c0\u30a6\u30f3\u30ed \u30fc\u30c9\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4eca\u56de\u306f\u30015000 \u500b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u6301\u3064\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u307f\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u3089\u3001\u540c\u3058\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u7f6e\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001Python \u74b0\u5883\u306b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30ed\u30fc\u30c9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080<\/h3>\n<p>GridDB \u3067\u306f\u3001python-client \u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u76f4\u63a5\u547c\u3073\u51fa\u3057\u3001pandas \u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306e\u5f62\u5f0f\u3067\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u7c21\u5358\u306b\u30c7\u30fc\u30bf\u3092\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">import griddb_python as griddb\nimport pandas as pd\n\nsql_statement = ('SELECT * FROM movie_review_test')\nmovie_review_test = pd.read_sql_query(sql_statement, cont)<\/code><\/pre>\n<\/div>\n<p><code>cont<\/code>\u5909\u6570\u306b\u306f\u3001\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3057\u3066\u3044\u308b\u30b3\u30f3\u30c6\u30ca\u60c5\u5831\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002Pandas\u3092\u4f7f\u3063\u305fGridDB\u3078\u306e\u8aad\u307f\u66f8\u304d\u306b\u3064\u3044\u3066\u306e\u8a73\u3057\u3044\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u3053\u3061\u3089\u306e<a href=\"https:\/\/griddb.net\/ja\/blog\/using-pandas-dataframes-with-griddb\/\">\u30d6\u30ed\u30b0<\/a>\u3067\u516c\u958b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001CSV\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308c\u3070\u3001pandas\u306eread_csv()\u95a2\u6570\u3092\u4f7f\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u3069\u3061\u3089\u306e\u5834\u5408\u3082\u3001\u7d50\u679c\u306f\u540c\u3058\u3067\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">import pandas as pd\n\nmovie_review_test = pd.read_csv(\"movie_review_test.csv\")<\/code><\/pre>\n<\/div>\n<p>\u6700\u521d\u306e5\u3064\u306e\u884c\u3092\u5370\u5237\u3057\u3066\u3001\u30c7\u30fc\u30bf\u3092\u5c11\u3057\u8997\u3044\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">movie_review_test.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          I always wrote this series off as being a comp&#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          1\n        <\/th>\n<td>\n          1st watched 12\/7\/2002 &#8211; 3 out of 10(Dir-Steve &#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          2\n        <\/th>\n<td>\n          This movie was so poorly written and directed &#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          3\n        <\/th>\n<td>\n          The most interesting thing about Miryang (Secr&#8230;\n        <\/td>\n<td>\n          1\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          4\n        <\/th>\n<td>\n          when i first read about &#8220;berlin am meer&#8221; i did&#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">len(movie_review_test)<\/code><\/pre>\n<\/div>\n<pre><code>5000\n<\/code><\/pre>\n<h2>\u30c7\u30fc\u30bf\u306e\u524d\u51e6\u7406\u3092\u884c\u3046<\/h2>\n<p>\u30c7\u30fc\u30bf\u306e\u524d\u51e6\u7406\u306f\u3001\u6a5f\u68b0\u5b66\u7fd2\u30e2\u30c7\u30eb\u304b\u3089\u4e88\u60f3\u5916\u306e\u52d5\u4f5c\u304c\u751f\u3058\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306e\u91cd\u8981\u306a\u30b9\u30c6\u30c3\u30d7\u3067\u3059\u3002Null\u5024\u3084\u6b20\u640d\u5024\u3092\u9069\u5207\u306b\u51e6\u7406\u3057\u306a\u3044\u3068\u3001\u5168\u4f53\u7684\u306a\u7d50\u679c\u304c\u304a\u304b\u3057\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u30c7\u30fc\u30bf\u306bNull\u5024\u304c\u542b\u307e\u308c\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-py\">movie_review_test.isna().sum()<\/code><\/pre>\n<\/div>\n<pre><code>text     0\nlabel    0\ndtype: int64\n<\/code><\/pre>\n<p>\u5e78\u3044\u306a\u3053\u3068\u306b\u3001\u4eca\u56de\u306e\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u306f\u3001Null\u307e\u305f\u306f\u30df\u30b9\u306e\u5024\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3057\u304b\u3057\u3001Null\u5024\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306f\u3001\u6b21\u306b\u9032\u3080\u524d\u306b\u305d\u306e\u5024\u3092\u524a\u9664\u3059\u308b\u304b\u3001\u7f6e\u304d\u63db\u3048\u308b\u3053\u3068\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>\u53e5\u8aad\u70b9\u3084\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u3092\u524a\u9664\u3059\u308b<\/h3>\n<p>\u53e5\u8aad\u70b9\u3084\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u306f\u3001\u30c6\u30ad\u30b9\u30c8\u306e\u7dcf\u8a9e\u6570\u5236\u9650\u3092\u5897\u3084\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u30e2\u30c7\u30eb\u306e\u5b66\u7fd2\u306b\u306f\u5bc4\u4e0e\u305b\u305a\u3001\u4e3b\u306b\u30ce\u30a4\u30ba\u3068\u3057\u3066\u6a5f\u80fd\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u5b66\u7fd2\u30b9\u30c6\u30c3\u30d7\u306e\u524d\u306b\u3053\u308c\u3089\u3092\u9664\u53bb\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u4eca\u56de\u306e\u30b1\u30fc\u30b9\u3067\u306f\u3001\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30b9\u30c6\u30c3\u30d7\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u63d0\u4f9b\u3055\u308c\u308b\u5165 \u529b\u304c\u6709\u52b9\u3067\u9069\u5207\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u305f\u3044\u3068\u8003\u3048\u307e\u3059\u3002\u3053\u306e\u30b9\u30c6\u30c3\u30d7\u306f\u3001\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u3082\u62e1\u5f35\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u69d8\u3005\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u306e\u30ea\u30b9\u30c8\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u4eca\u56de\u306f nltk \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u306e\u30ea\u30b9\u30c8\u306f\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u3063\u3066\u7570\u306a\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4ed6\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\uff08\u4f8b\u3048\u3070spacy\uff09\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u82e5\u5e72\u7570\u306a\u308b\u7d50\u679c\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">from nltk.corpus import stopwords\nimport nltk<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">stop = stopwords.words('english')<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">len(stop)<\/code><\/pre>\n<\/div>\n<pre><code>179\n<\/code><\/pre>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">type(stop)<\/code><\/pre>\n<\/div>\n<pre><code>list\n<\/code><\/pre>\n<p>\u3053\u308c\u3067179\u306e\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u306e\u30ea\u30b9\u30c8\u304c\u3067\u304d\u307e\u3057\u305f\u3002\u3053\u306e\u30ea\u30b9\u30c8\u306b\u306f\u3001\u72ec\u81ea\u306e\u5358\u8a9e\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u5b9f\u969b\u306b\u3001\u3044\u304f\u3064\u304b\u306e\u5358\u8a9e\u3092\u30b9\u30c8\u30c3\u30d7\u30ef\u30fc\u30c9\u306e\u30ea\u30b9\u30c8\u306b\u8ffd\u52a0\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">extra_words = ['Yeah', 'Okay']\nfor word in extra_words:\n    if word not in stop:\n        stop.append(word)<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">len(stop)<\/code><\/pre>\n<\/div>\n<pre><code>181\n<\/code><\/pre>\n<p>\u3042\u308b\u3044\u306f\u3001<code>extend()<\/code>\u3092\u4f7f\u3063\u3066\u3001\u30ea\u30b9\u30c8\u306e\u3059\u3079\u3066\u306e\u9805\u76ee\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002for \u30eb\u30fc\u30d7\u5185\u306e<code>if<\/code>\u6761\u4ef6\u306f\u3001\u540c\u3058\u5358\u8a9e\u30922\u56de\u8ffd\u52a0\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">movie_review_test['text'] = movie_review_test['text'].apply(lambda words: ' '.join(word for word in words.split() if word not in stop))<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">movie_review_test.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          I always wrote series complete stink-fest Jim &#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          1\n        <\/th>\n<td>\n          1st watched 12\/7\/2002 &#8211; 3 10(Dir-Steve Purcell&#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          2\n        <\/th>\n<td>\n          This movie poorly written directed I fell asle&#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          3\n        <\/th>\n<td>\n          The interesting thing Miryang (Secret Sunshine&#8230;\n        <\/td>\n<td>\n          1\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          4\n        <\/th>\n<td>\n          first read &#8220;berlin meer&#8221; expect much. thought &#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u3054\u89a7\u306e\u901a\u308a\u3001&#8217;I&#8217;\u3084&#8217;we&#8217;\u306a\u3069\u306e\u4eba\u79f0\u4ee3\u540d\u8a5e\u304c\u524a\u9664\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u7d9a\u3051\u3066\u3001\u53e5\u8aad\u70b9\u3082\u524a\u9664\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">movie_review_test['text'] = movie_review_test['text'].str.lower()\nmovie_review_test['text'] = movie_review_test['text'].str.replace('[^ws]','')<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">movie_review_test.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          i always wrote series complete stinkfest jim b&#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          1\n        <\/th>\n<td>\n          1st watched 1272002 3 10dirsteve purcell typi&#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          2\n        <\/th>\n<td>\n          this movie poorly written directed i fell asle&#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          3\n        <\/th>\n<td>\n          the interesting thing miryang secret sunshine &#8230;\n        <\/td>\n<td>\n          1\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          4\n        <\/th>\n<td>\n          first read berlin meer expect much thought rig&#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u3053\u308c\u3067\u30c7\u30fc\u30bf\u306e\u6e96\u5099\u304c\u3067\u304d\u305f\u306e\u3067\u3001\u6b21\u306f\u30e2\u30c7\u30eb\u3092\u30ed\u30fc\u30c9\u3057\u3066\u3001\u4e88\u6e2c\u3092\u59cb\u3081\u307e\u3059\u3002<\/p>\n<h1>Allen NLP\u30e2\u30c7\u30eb\u3092\u30ed\u30fc\u30c9\u3059\u308b<\/h1>\n<p>Allen NLP\u306f\u3001\u69d8\u3005\u306a\u554f\u984c\u6587\u3092\u5bfe\u8c61\u3068\u3057\u305f\u591a\u304f\u306e\u6a5f\u68b0\u5b66\u7fd2\u30e2\u30c7\u30eb\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u3001<a href=\"https:\/\/paperswithcode.com\/model\/glove-lstm\">GLoVE-LSTM binary classifier<\/a>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u3088\u308b\u3068\u3001\u3053\u306e\u30e2\u30c7\u30eb\u306f<a href=\"https:\/\/nlp.stanford.edu\/sentiment\/treebank.html\">Stanford Sentiment Treebank<\/a>\u306787%\u306e\u5168\u4f53\u7684\u306a\u7cbe\u5ea6\u3092\u9054\u6210\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30e2\u30c7\u30eb\u306e<a href=\"https:\/\/demo.allennlp.org\/sentiment-analysis\/glove-sentiment-analysis\">live demo<\/a>\u304callennlp\u793e\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u65e9\u901f\u3001Predictor\u3092\u30ed\u30fc\u30c9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">from allennlp.predictors.predictor import Predictor\nimport allennlp_models.tagging<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">predictor = Predictor.from_path(\"https:\/\/storage.googleapis.com\/allennlp-public-models\/basic_stanford_sentiment_treebank-2020.06.09.tar.gz\")<\/code><\/pre>\n<\/div>\n<pre><code>error loading _jsonnet (this is expected on Windows), treating C:UsersSHRIPR~2AppDataLocalTemptmpfjmtd8u3config.json as plain json\n<\/code><\/pre>\n<p>\u306a\u304a\u3001\u3053\u308c\u3089\u306e\u30e2\u30c7\u30eb\u306f\u91cd\u3044\u306e\u3067\u3001GPU \u3092\u642d\u8f09\u3057\u305f\u30b7\u30b9\u30c6\u30e0\u3092\u304a\u4f7f\u3044\u306e\u5834\u5408\u306f\u3001\u4e0a\u8a18\u306e<code>predictor<\/code>\u95a2\u6570\u306b\u5f15\u6570<code>predictor<\/code>\u3092\u6e21\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Predictor\u304c\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001\u30b5\u30f3\u30d7\u30eb\u306e\u30c6\u30ad\u30b9\u30c8\u30ec\u30d3\u30e5\u30fc\u3092\u6e21\u3057\u3066\u3001\u3069\u306e\u3088\u3046\u306a\u51fa\u529b\u304c\u5f97\u3089\u308c\u308b\u304b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">sample_review = \"This movie was so great. I laughed and cried, a lot!\"<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">predictor.predict(sample_review)<\/code><\/pre>\n<\/div>\n<pre><code>'0'\n<\/code><\/pre>\n<p>\u3054\u89a7\u306e\u3088\u3046\u306b\u3001\u4e88\u6e2c\u30e2\u30c7\u30eb\u306f5\u3064\u306e\u30ad\u30fc\u3001<code>logits<\/code>\u3001<code>probs<\/code>\u3001<code>token_ids<\/code>\u3001<code>label<\/code> \u3001<code>tokens<\/code> \u3092\u6301\u3064\u8f9e\u66f8\u3092\u8fd4\u3057\u307e\u3059\u3002\u30b5\u30f3\u30d7\u30eb\u306e\u30ec\u30d3\u30e5\u30fc\u304c\u30dd\u30b8\u30c6\u30a3\u30d6\u306a\u3082\u306e\u3067\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u30e2\u30c7\u30eb\u306f\u6b63\u3057\u304f<code>label '1'<\/code>\u3092\u8fd4\u3057\u305f\u3068\u8a00\u3048\u307e\u3059\u3002<\/p>\n<p>\u30e9\u30d9\u30eb\u306b\u52a0\u3048\u3066\u3001<code>probs<\/code>\u30ea\u30b9\u30c8\u306f\u3001\u5404\u30e9\u30d9\u30eb\u306e\u4fe1\u983c\u5ea6\u30b9\u30b3\u30a2\u307e\u305f\u306f\u78ba\u7387\u3082\u793a\u3057\u3066\u304a\u308a\u3001\u3053\u3053\u3067\u306f0\u307e\u305f\u306f1\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<code>probs<\/code>\u30ea\u30b9\u30c8\u306e\u6700\u521d\u306e\u9805\u76ee\u3001\u3064\u307e\u308a\u30e9\u30d9\u30eb&#8217;1&#8217;\u306e\u78ba\u7387\u306f0.98\uff08\u307e\u305f\u306f98\uff05\uff09\u3067\u3001\u3053\u308c\u306f\u30e2\u30c7\u30eb\u304c\u30ec\u30d3\u30e5\u30fc\u304c\u80af\u5b9a\u7684\u3067\u3042\u308b\u3053\u3068\u309298\uff05\u78ba\u4fe1\u3057\u3066\u3044\u305f\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/p>\n<p>Predictor\u304c\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u306e\u3067\u3001\u4eca\u5ea6\u306f\u4e88\u6e2c\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u4e88\u6e2c\u3092\u7acb\u3066\u308b<\/h2>\n<p>\u3053\u3053\u3067\u306f\u3001\u6620\u753b\u306e\u30ec\u30d3\u30e5\u30fc\u3092\u53d7\u3051\u53d6\u308a\u3001\u305d\u306e\u30e9\u30d9\u30eb\u3092\u6574\u6570\u3067\u8fd4\u3059predict\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u5143 \u306e\u30e9\u30d9\u30eb\u306f<code>int<\/code>\u578b\u3067\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u540c\u3058\u30c7\u30fc\u30bf\u578b\u3067\u3042\u308c\u3070\u3001\u5b9f\u969b\u306e\u5024\u3068\u4e88\u6e2c\u5024 \u306e\u6bd4\u8f03\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">def predict_review(movie_review):\n    return (int(predictor.predict(movie_review)['label']))<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">movie_review_test['predicted_label'] = movie_review_test['text'].apply(predict_review)<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">movie_review_test.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<th>\n          predicted_label\n        <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>\n          0\n        <\/th>\n<td>\n          I always wrote this series off as being a comp&#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<td>\n          1\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          1\n        <\/th>\n<td>\n          1st watched 12\/7\/2002 &#8211; 3 out of 10(Dir-Steve &#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          2\n        <\/th>\n<td>\n          This movie was so poorly written and directed &#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<td>\n          0\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          3\n        <\/th>\n<td>\n          The most interesting thing about Miryang (Secr&#8230;\n        <\/td>\n<td>\n          1\n        <\/td>\n<td>\n          1\n        <\/td>\n<\/tr>\n<tr>\n<th>\n          4\n        <\/th>\n<td>\n          when i first read about &#8220;berlin am meer&#8221; i did&#8230;\n        <\/td>\n<td>\n          0\n        <\/td>\n<td>\n          1\n        <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u3042\u3068\u306f\u3001\u30e2\u30c7\u30eb\u306e\u7cbe\u5ea6\u3092\u8a08\u7b97\u3059\u308b\u3060\u3051\u3067\u3059\u3002\u4e88\u6e2c\u30bb\u30eb\u306f CPU \u3067\u5b9f\u884c\u3057\u3066\u3044\u305f\u305f\u3081\u30015000\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5b9f\u884c\u306b6\u5206\u304b\u304b\u308a\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3089\u306e\u30e2\u30c7\u30eb\u306f\u91cd\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30b3\u30fc\u30c9\u3092\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u306b\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u3001GPU\u306e\u4f7f\u7528\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u7d50\u679c\u3092\u8a55\u4fa1\u3059\u308b<\/h1>\n<p>Allen NLP\u306b\u306f\u3001\u8a55\u4fa1\u306e\u305f\u3081\u306e\u72ec\u81ea\u306e\u6307\u6a19\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u7c21\u5358\u306b\u3059\u308b\u305f\u3081\u306b\u3001scikit- learn\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002Allen NLP\u306e\u8a55\u4fa1\u57fa\u6e96\u306b\u3064\u3044\u3066\u306e\u8a73\u7d30\u306f<a href=\"http:\/\/docs.allennlp.org\/v0.9.0\/api\/allennlp.training.metrics.html\">\u3053\u3061\u3089<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">from sklearn.metrics import accuracy_score<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">actual = movie_review_test['label']\npredicted = movie_review_test['predicted_label']<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">accuracy = accuracy_score(actual, predicted)<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">accuracy<\/code><\/pre>\n<\/div>\n<pre><code>0.7208\n<\/code><\/pre>\n<p>\u4eca\u56de\u306e\u30e2\u30c7\u30eb\u306f\u3001\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067 72%\u306e\u7dcf\u5408\u7684\u306a\u7cbe\u5ea6\u3092\u793a\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u306a\u304b\u306a\u304b\u826f\u3044\u7d50\u679c\u3067\u3042\u308b\u3068\u8a00\u3048\u308b\u3067\u3057\u3087\u3046\u3002\u4e88\u6e2c\u7d50\u679c\u306f\u3001<code>pd.to_csv(file_path)<\/code>\u3092\u4f7f\u3063\u3066 CSV\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58\u3067\u304d\u307e\u3059\u3002\u305d\u308c\u3067\u306f\u3001\u5b9f\u969b\u306b\u30b3\u30fc\u30c9\u3092\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001NLP\u30e2\u30c7\u30eb\u3092\u4f7f\u3063\u3066\u3001\u611f\u60c5\u5206\u6790\u306b\u57fa\u3065\u3044\u3066\u6620\u753b\u306e\u30ec\u30d3\u30e5\u30fc\u3092\u5206\u985e\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d9\u30fc\u30b9\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u3001Allen NLP\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u4e8b\u524d\u5b66\u7fd2\u6e08\u307fLSTM\u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":50216,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50763","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>NLP\u3001GridDB\u3001Python\u3092\u7528\u3044\u305f\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u306e\u5206\u985e | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u306f\u3058\u3081\u306b\" \/>\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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/\u672a\u5206\u985e\/movie-review-classification-using-nlp-griddb-and-python\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NLP\u3001GridDB\u3001Python\u3092\u7528\u3044\u305f\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u306e\u5206\u985e | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u306f\u3058\u3081\u306b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/\u672a\u5206\u985e\/movie-review-classification-using-nlp-griddb-and-python\/\" \/>\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=\"2021-09-01T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T15:54:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/09\/architecture1.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1999\" \/>\n\t<meta property=\"og:image:height\" content=\"1333\" \/>\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=\"3\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"NLP\u3001GridDB\u3001Python\u3092\u7528\u3044\u305f\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u306e\u5206\u985e\",\"datePublished\":\"2021-09-01T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:54:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/\"},\"wordCount\":254,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2021\/09\/architecture1.jpeg\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/\",\"name\":\"NLP\u3001GridDB\u3001Python\u3092\u7528\u3044\u305f\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u306e\u5206\u985e | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2021\/09\/architecture1.jpeg\",\"datePublished\":\"2021-09-01T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:54:53+00:00\",\"description\":\"\u306f\u3058\u3081\u306b\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2021\/09\/architecture1.jpeg\",\"contentUrl\":\"\/wp-content\/uploads\/2021\/09\/architecture1.jpeg\",\"width\":1999,\"height\":1333},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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":"NLP\u3001GridDB\u3001Python\u3092\u7528\u3044\u305f\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u306e\u5206\u985e | GridDB: Open Source Time Series Database for IoT","description":"\u306f\u3058\u3081\u306b","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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/\u672a\u5206\u985e\/movie-review-classification-using-nlp-griddb-and-python\/","og_locale":"ja_JP","og_type":"article","og_title":"NLP\u3001GridDB\u3001Python\u3092\u7528\u3044\u305f\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u306e\u5206\u985e | GridDB: Open Source Time Series Database for IoT","og_description":"\u306f\u3058\u3081\u306b","og_url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/\u672a\u5206\u985e\/movie-review-classification-using-nlp-griddb-and-python\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2021-09-01T07:00:00+00:00","article_modified_time":"2025-11-14T15:54:53+00:00","og_image":[{"width":1999,"height":1333,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2021\/09\/architecture1.jpeg","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":"3\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#article","isPartOf":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"NLP\u3001GridDB\u3001Python\u3092\u7528\u3044\u305f\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u306e\u5206\u985e","datePublished":"2021-09-01T07:00:00+00:00","dateModified":"2025-11-14T15:54:53+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/"},"wordCount":254,"commentCount":0,"publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2021\/09\/architecture1.jpeg","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/","name":"NLP\u3001GridDB\u3001Python\u3092\u7528\u3044\u305f\u6620\u753b\u30ec\u30d3\u30e5\u30fc\u306e\u5206\u985e | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#primaryimage"},"image":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2021\/09\/architecture1.jpeg","datePublished":"2021-09-01T07:00:00+00:00","dateModified":"2025-11-14T15:54:53+00:00","description":"\u306f\u3058\u3081\u306b","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/movie-review-classification-using-nlp-griddb-and-python\/#primaryimage","url":"\/wp-content\/uploads\/2021\/09\/architecture1.jpeg","contentUrl":"\/wp-content\/uploads\/2021\/09\/architecture1.jpeg","width":1999,"height":1333},{"@type":"WebSite","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.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\/50763","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=50763"}],"version-history":[{"count":1,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50763\/revisions"}],"predecessor-version":[{"id":51597,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50763\/revisions\/51597"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media\/50216"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media?parent=50763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/categories?post=50763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/tags?post=50763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}