You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this lab, we will learn how to manipulate strings. There are two challenges: 1) to practice how to manipulate strings, and 2) to use string manipulation techniques to create Bag of Words (BoW). BoW is an essential technique in Natural Language Processing.
8
+
9
+
### Getting Started
10
+
11
+
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](http://localhost:8888). Then click the link to each ipynb file to complete the challenges.
12
+
13
+
## Deliverables
14
+
15
+
`challenge-1.ipynb` and `challenge-2.ipynb` with your responses.
16
+
17
+
## Submission
18
+
19
+
Upon completion, add your deliverables to git. Then commit git and push your branch to the remote.
*[Python Input and Output (how to read file content)](https://docs.python.org/3/tutorial/inputoutput.html)
30
+
31
+
*[How to Remove Punctuation in Python String](https://www.quora.com/How-do-I-remove-punctuation-from-a-Python-string)
32
+
33
+
*[Convert String to Lowercase in Python](https://docs.python.org/3/library/stdtypes.html#str.lower)
34
+
35
+
*[Break Python String into Array](https://docs.python.org/3/library/stdtypes.html#str.split)
36
+
37
+
*[What is Text Corpus?](https://en.wikipedia.org/wiki/Text_corpus)
38
+
39
+
*[A Gentle Introduction to the Bag-of-Words Model](https://machinelearningmastery.com/gentle-introduction-bag-words-model/)
40
+
41
+
## Additional Reading
42
+
43
+
If you are a research-type person, you will find [this article](http://rstb.royalsocietypublishing.org/content/royptb/366/1567/1101.full.pdf) 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](http://grantome.com/grant/NSF/PHY-1530544) 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. :astonished::astonished::astonished:
44
+
45
+
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.
0 commit comments