Midterm

CAS LX 390 / NLP/CL Midterm
GRS LX 690 Fall 2016 due Wed 10/19

Ground rules

This is a “take-home” midterm, because I don’t want to add unnecessary anxiety, or run into technical trouble that causes things to get delayed in what would be a short time to take an in-class midterm.

However, it is still of course important that you do this on your own. What that means specifically is not consulting with classmates, roommates, etc. I do not plan for this to be difficult. If you (feel that you) have been doing relatively well on understanding the homework, then these things should not be particularly challenging. If you are having technical trouble, please let me know, and I will try to help you troubleshoot.

One thing you are hereby explicitly allowed to do, however, is consult static online reference sources. So, looking things up in the book, in the detailed documentation on python.org, nltk.org, StackExchange, etc., is fine. That is, after all, how you would proceed in the real world if you have a problem you want to solve. If you have questions, you can ask me.

I don’t think there will be much cause to worry about the ground rules, but I still wanted to state them. I expect this to take not (much?) more than the time it would have taken to do this in class time.

Task 1

Define a function called non_five_odds that will take an integer n as an argument, and return a list of all the odd numbers between 0 and n except 5.

Notes:

Task 2

Use Python to count how many different words in “Alice’s Adventures in Wonderland” contain the sequence hat.

Notes / assumptions:

Task 3

Use Python to create a list containing any sentences in “Alice’s Adventures in Wonderland” in which the actual word “hat” appears, and provide the resulting list.

Notes:

Task 4

Use WordNet to provide the senses of the word “hat”, the definition of each, hypernyms of each, and examples of each.

Notes: