Skip to content

Commit 7f3afdc

Browse files
gustavocidornelaswhoseoyster
authored andcommitted
Completes OPEN-3979 Update sentiment analysis dataset for notebook example
1 parent 3fb0bf6 commit 7f3afdc

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

examples/text-classification/sklearn/sentiment-analysis/sentiment-sklearn.ipynb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@
102102
"%%bash\n",
103103
"\n",
104104
"if [ ! -e \"sentiment_train.csv\" ]; then\n",
105-
" curl \"https://openlayer-static-assets.s3.us-west-2.amazonaws.com/examples-datasets/text-classification/sentiment-analysis/sentiment_training_set_sample.csv\" --output \"sentiment_train.csv\"\n",
105+
" curl \"https://openlayer-static-assets.s3.us-west-2.amazonaws.com/examples-datasets/text-classification/sentiment-analysis/sentiment_train.csv\" --output \"sentiment_train.csv\"\n",
106106
"fi\n",
107107
"\n",
108108
"if [ ! -e \"sentiment_val.csv\" ]; then\n",
109-
" curl \"https://openlayer-static-assets.s3.us-west-2.amazonaws.com/examples-datasets/text-classification/sentiment-analysis/sentiment_validation_set.csv\" --output \"sentiment_val.csv\"\n",
109+
" curl \"https://openlayer-static-assets.s3.us-west-2.amazonaws.com/examples-datasets/text-classification/sentiment-analysis/sentiment_val.csv\" --output \"sentiment_val.csv\"\n",
110110
"fi"
111111
]
112112
},
@@ -117,18 +117,15 @@
117117
"metadata": {},
118118
"outputs": [],
119119
"source": [
120-
"columns = ['polarity', 'tweetid', 'date', 'query_name', 'user', 'text']\n",
120+
"columns = ['polarity', 'tweetid', 'query_name', 'user', 'text']\n",
121121
"\n",
122122
"df_train = pd.read_csv(\n",
123123
" \"./sentiment_train.csv\",\n",
124-
" header=None, \n",
125124
" encoding='ISO-8859-1', \n",
126-
" index_col=0\n",
127125
")\n",
128126
"\n",
129127
"df_val = pd.read_csv(\n",
130128
" \"./sentiment_val.csv\",\n",
131-
" header=None,\n",
132129
" encoding='ISO-8859-1'\n",
133130
")\n",
134131
"df_train.columns = columns\n",
@@ -762,7 +759,7 @@
762759
"name": "python",
763760
"nbconvert_exporter": "python",
764761
"pygments_lexer": "ipython3",
765-
"version": "3.8.10"
762+
"version": "3.8.13"
766763
}
767764
},
768765
"nbformat": 4,

0 commit comments

Comments
 (0)