{ "cells": [ { "cell_type": "markdown", "source": [ "# Challenge: Analyzing Text about Data Science\n", "\n", "> *For dis notebook, we dey experiment with different URL - wikipedia article on Machine Learning. You fit see say, unlike Data Science, dis article get plenti terms, dis one make the analysis harder. We need find another way to clean up the data after we don do keyword extraction, so we fit commot some frequent, but no meanin word combinations.*\n", "\n", "For dis example, mek we do one simple exercise wey cover all steps of traditional data science process. You no need to write any code, you fit just click on di cells wey dey below to run them and observe di result. As challenge, you fit try run dis code with different data.\n", "\n", "## Goal\n", "\n", "For dis lesson, we don dey discuss different concepts wey relate to Data Science. Mek we try find more related concepts by doing some **text mining**. We go start with text about Data Science, extract keywords from am, then try to visualize the result.\n", "\n", "As text, I go use di page on Data Science from Wikipedia:\n" ], "metadata": {} }, { "cell_type": "markdown", "source": [], "metadata": {} }, { "cell_type": "code", "execution_count": 2, "source": [ "url = 'https://en.wikipedia.org/wiki/Data_science'\r\n", "url = 'https://en.wikipedia.org/wiki/Machine_learning'" ], "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": [ "## Step 1: Getting the Data\r\n", "\r\n", "First step for every data science process na to get the data. We go use `requests` library to do am:\n" ], "metadata": {} }, { "cell_type": "code", "execution_count": 3, "source": [ "import requests\r\n", "\r\n", "text = requests.get(url).content.decode('utf-8')\r\n", "print(text[:1000])" ], "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "\n", "\n", "
\n", "\n", "