Skip to content

Commit fd274c4

Browse files
committed
fixed last question
1 parent 82c9ad1 commit fd274c4

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

your-code/challenge-2.ipynb

+12-15
Original file line numberDiff line numberDiff line change
@@ -238,30 +238,20 @@
238238
"source": [
239239
"## Bonus Question\n",
240240
"\n",
241-
"Optimize your solution for the above question by removing stop words from the BoW. For your convenience, a list of stop words is defined for you in the next cell. With the stop words removed, your output should look like:\n",
241+
"Now you want to improve your previous solution by removing the stop words from the corpus. The idea is you only want to add terms that are not in the `stop_words` list to the `bag_of_words` array.\n",
242242
"\n",
243-
"```\n",
244-
"bag_of_words = [am', 'at', 'cool', ironhack', 'is', 'love', 'student']\n",
243+
"Requirements:\n",
245244
"\n",
246-
"term_freq = [\n",
247-
"\t[0, 0, 1, 1, 1, 0, 0],\n",
248-
" \t[0, 0, 0, 1, 0, 1, 0],\n",
249-
" \t[1, 1, 0, 1, 0, 0, 1]\n",
250-
"]\n",
251-
"```\n",
252-
"\n",
253-
"**Requirements:**\n",
254-
"\n",
255-
"1. Combine all your previous codes to the cell below.\n",
245+
"1. Move all your previous codes from `main.ipynb` to the cell below.\n",
256246
"1. Improve your solution by ignoring stop words in `bag_of_words`.\n",
257247
"\n",
258248
"After you're done, your `bag_of_words` should be:\n",
259249
"\n",
260-
"```['ironhack', 'is', 'cool', 'love', 'am', 'student', 'at']```\n",
250+
"```['ironhack', 'cool', 'love', 'student']```\n",
261251
"\n",
262252
"And your `term_freq` should be:\n",
263253
"\n",
264-
"```[[1, 1, 1, 0, 0, 0, 0], [1, 0, 0, 1, 0, 0, 0], [1, 0, 0, 0, 1, 1, 1]]```"
254+
"```[[1, 1, 0, 0], [1, 0, 1, 0], [1, 0, 0, 1]]```"
265255
]
266256
},
267257
{
@@ -303,6 +293,13 @@
303293
" [1 1 0 1 0 0 1]]\n",
304294
" ```"
305295
]
296+
},
297+
{
298+
"cell_type": "code",
299+
"execution_count": null,
300+
"metadata": {},
301+
"outputs": [],
302+
"source": []
306303
}
307304
],
308305
"metadata": {

0 commit comments

Comments
 (0)