CS 357: Natural Language Processing
Playing with WordNet
We have installed WordNet 3.0 at /usr/local/WordNet-3.0. Before working on
these exercises, you will probably want to add /usr/local/WordNet-3.0/bin to your
path.
These exercises are for your personal edification. You need not hand in anything.
Using the WordNet command-line tools
Using the "User Commands" documentation in
the WordNet 3.0 Reference Manual, try
to answer the following questions.
- List the senses of the noun "cat".
- List the synonyms of the noun "cat".
- List the hypernyms of the noun "cat".
- List the hyponyms of the noun "cat".
- What is a meronym? Does the noun "cat" have an meronyms in the WordNet database?
- Since the answer to the previous question was "no", find the meronyms
of some other noun.
- Explore the other features of the wn, wnb, and wnintro commands.
Using PyWordNet
If you are not familiar with Python, work with somebody who is. You will need to consult
the PyWordNet documentation.
- Read and run this
small test of PyWordNet.
- Try to answer the questions from the previous section
by writing Python code.
- Explore PyWordNet to answer some of your own questions.
For example, can you write a program to list the "grandparent" hypernyms of
a word specified by the user?
Jeff Ondich,
Department of Mathematics and Computer Science,
Carleton College, Northfield, MN
55057,
(507) 646-4364,
jondich@carleton.edu