Do the following exercises:
- Write a function that will allow you to search over the Newdic dictionary. Specifically, your
function should break each line up into fields and allow for a
regex search of pronunciation and a (non-regex)
specification of how many syllables returned items should have. For
example, your function should allow you to search for words of two to four
syllables that contain
"I.*[ptk]" in the transcription field.
The function should return a list of matching items. (Only the spelling
should be returned!)
- Make a type system that represents a lexicon of verbs. You should have
a set of types for verbs that allows for information about number of
arguments the verb takes and whether it has a regular conjugation. You
should also have a type for a lexicon of verbs and a function for searching
through that lexicon based on verb, conjugation, or argument structure.
This whole structure should go in its own module. Then provide a
separate program that uses that module to construct very small
verb lexicons of English and of some other language that can be searched as
- This is due April 14 by 9:00 AM. (In other words, turn
it in well before class time.)
- Please submit your assignment electronically using the form below. Don't
forget to click the "Submit" button at the bottom to actually
turn in the project!
- For this to work, your assignment needs to be raw text, not a
Microsoft Word file! Do the assignment with vi, emacs, textpad, notepad, or
the like and paste the text in below. If bizarre characters are displayed
then it's not raw text.
- All code must run. I should be able to load your
answers directly into
ghci to check for this.
- All code must be commented appropriately.
- All functions and constants should have type