Skip to content

Commit 561a262

Browse files
Updates to Chapter 6 notebook
1 parent 42df96a commit 561a262

File tree

1 file changed

+20
-29
lines changed

1 file changed

+20
-29
lines changed

chapter_6/0602_Sentiment_VADER.ipynb

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{
1919
"data": {
2020
"text/plain": [
21-
"{'compound': 0.0, 'neg': 0.0, 'neu': 1.0, 'pos': 0.0}"
21+
"{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}"
2222
]
2323
},
2424
"execution_count": 2,
@@ -38,7 +38,7 @@
3838
{
3939
"data": {
4040
"text/plain": [
41-
"{'compound': -0.128, 'neg': 0.289, 'neu': 0.398, 'pos': 0.313}"
41+
"{'neg': 0.262, 'neu': 0.452, 'pos': 0.285, 'compound': -0.128}"
4242
]
4343
},
4444
"execution_count": 3,
@@ -52,16 +52,16 @@
5252
},
5353
{
5454
"cell_type": "code",
55-
"execution_count": 8,
55+
"execution_count": 4,
5656
"metadata": {},
5757
"outputs": [
5858
{
5959
"data": {
6060
"text/plain": [
61-
"{'compound': 0.4404, 'neg': 0.0, 'neu': 0.408, 'pos': 0.592}"
61+
"{'neg': 0.0, 'neu': 0.408, 'pos': 0.592, 'compound': 0.4404}"
6262
]
6363
},
64-
"execution_count": 8,
64+
"execution_count": 4,
6565
"metadata": {},
6666
"output_type": "execute_result"
6767
}
@@ -72,16 +72,16 @@
7272
},
7373
{
7474
"cell_type": "code",
75-
"execution_count": 9,
75+
"execution_count": 5,
7676
"metadata": {},
7777
"outputs": [
7878
{
7979
"data": {
8080
"text/plain": [
81-
"{'compound': 0.6124, 'neg': 0.0, 'neu': 0.5, 'pos': 0.5}"
81+
"{'neg': 0.0, 'neu': 0.5, 'pos': 0.5, 'compound': 0.6124}"
8282
]
8383
},
84-
"execution_count": 9,
84+
"execution_count": 5,
8585
"metadata": {},
8686
"output_type": "execute_result"
8787
}
@@ -92,16 +92,16 @@
9292
},
9393
{
9494
"cell_type": "code",
95-
"execution_count": 10,
95+
"execution_count": 6,
9696
"metadata": {},
9797
"outputs": [
9898
{
9999
"data": {
100100
"text/plain": [
101-
"{'compound': 0.4588, 'neg': 0.0, 'neu': 0.25, 'pos': 0.75}"
101+
"{'neg': 0.0, 'neu': 0.4, 'pos': 0.6, 'compound': 0.4588}"
102102
]
103103
},
104-
"execution_count": 10,
104+
"execution_count": 6,
105105
"metadata": {},
106106
"output_type": "execute_result"
107107
}
@@ -112,53 +112,44 @@
112112
},
113113
{
114114
"cell_type": "code",
115-
"execution_count": 12,
115+
"execution_count": 7,
116116
"metadata": {},
117117
"outputs": [
118118
{
119119
"data": {
120120
"text/plain": [
121-
"{'compound': 0.0, 'neg': 0.0, 'neu': 1.0, 'pos': 0.0}"
121+
"{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}"
122122
]
123123
},
124-
"execution_count": 12,
124+
"execution_count": 7,
125125
"metadata": {},
126126
"output_type": "execute_result"
127127
}
128128
],
129129
"source": [
130130
"analyzer.polarity_scores('I ran.')"
131131
]
132-
},
133-
{
134-
"cell_type": "code",
135-
"execution_count": null,
136-
"metadata": {
137-
"collapsed": true
138-
},
139-
"outputs": [],
140-
"source": []
141132
}
142133
],
143134
"metadata": {
144135
"kernelspec": {
145-
"display_name": "Python 2",
136+
"display_name": "Python 3 (ipykernel)",
146137
"language": "python",
147-
"name": "python2"
138+
"name": "python3"
148139
},
149140
"language_info": {
150141
"codemirror_mode": {
151142
"name": "ipython",
152-
"version": 2
143+
"version": 3
153144
},
154145
"file_extension": ".py",
155146
"mimetype": "text/x-python",
156147
"name": "python",
157148
"nbconvert_exporter": "python",
158-
"pygments_lexer": "ipython2",
159-
"version": "2.7.12"
149+
"pygments_lexer": "ipython3",
150+
"version": "3.8.10"
160151
}
161152
},
162153
"nbformat": 4,
163-
"nbformat_minor": 2
154+
"nbformat_minor": 4
164155
}

0 commit comments

Comments
 (0)