Day 2: Text Mining (Functions)ΒΆ

Today I will assign everyone to teams for the first project and you will have time at the end of the class to meet.

We will work through the following example:

http://jarrodmillman.com/capstone/code/punctuation.py

In this example, we will look at several different ways you might implement the function all_punct(). We will discuss Python docstrings and doctests. We will also do some simple timing using IPython’s timeit. We will discuss the trade-off between readability and speed. Finally, we will take a brief look at Python’s regular expression facililities.