Lab 2: Frequency and N-Grams
In class, we explained how seemingly basic bag-of-words models can be used to discover real insights in text data. In this lab, you'll get a chance to put that idea into practice!
Let's Go!
As always, start by creating a new GitHub repo from the starter code template:
The template provides the following starter files:
ngrams.pyzipf.py
We also provide corresponding (minimalist) test suites for each file:
test-ngrams.pytest-zipf.py
As always, the tests are mostly just to ensure that your code is following the specifications so that you don't end up doing analysis based on results that are way off from what we intended. They are not meant to catch every possible bug, and you should feel free to do your own testing (and, if you do so, talk about it in your journal).
Outline
Submitting Your Journal and Analysis Questions
When you're done, submit your journal and analysis questions separately on Gradescope:
Reminders
- While you are required to put your Analysis Question answers in a separate tab from your journal, answering the AQ's is still part of the process of doing the lab, and it is totally fair game to include in your journal some discussion about how you tackled each AQ! This is especially true for AQ's that involve writing some code (which is the case for some of the AQ's in this lab).
(When logged in, completion status appears here.)