In this lab, we will practice a few fundamental Python concepts. We will use as motivation the creation of something called a Bag of Words (BoW) model. BoW is an essential technique in Natural Language Processing which we will cover in Module 3. For the time being, you don't need to fully understand how a Bag of Words is used or even what it is in detail. The exercise serves for you to train for loops and lists and strings. The Natural Language Processing stuff is just the backdrop, you'll have plenty of time to delve into that.
In your Terminal, navigate into the directory your-code
of this lab that contains challenge-1.ipynb
, challenge-2.ipynb
, doc1.txt
, doc2.txt
, and doc3.txt
. Start Jupyter Notebook by executing jupyter notebook
. A webpage should automatically open for you but in case not, go to http://localhost:8888. Then click the link to each ipynb file to complete the challenges.
main.ipynb
with your responses.
Upon completion, add your deliverables to git. Then git commit, push your branch to the remote and make a merge request as taught in class.
If you are a research-type person, you will find this article interesting. Scientists used techniques based on BoW to calculate the frequency of words used cross 17 world languages. They found there is a consistent pattern in terms of the frequency of words being used in human languages. Some mad scientists even want to use this technique to analyze dolphin language because they believe they can build corpora based on the sounds dolphins make, correlate the dolphin language corpora with human language corpora, and potentially understand what dolphins speak. 😲 😲 😲
Data analytics is now entering almost every discipline and profession. You will want to reflect on how you will apply your data analytics skills to the fields you are familiar with -- in creative ways. There are tons of fun secrets waiting for you to discover with data analytics.