I'm trying to teach myself python and natural language processing using an online tutorial
http://www.nltk.org/book/ch01.html#sec-automatic-natural-language-understanding
At the end of each section they give practice questions, and for the first section I've gotten through all but one. This one really stumped me.
In nltk there is a function called set() that gives the set of all vocab in a list with all duplicate words removed.
We have been using sets to store vocabularies. Try the following Python expression: set(sent3) < set(text1). Experiment with this using different arguments to set(). What does it do? Can you think of a practical application for this?
I've been running code with a few different arguments for set, but I just can't see a pattern in the output. Does anybody know what classifies one set as greater than another? And why this might be important?
Thanks!