| 1 |
|
| 2 |
Obligatory NL ambiguity example. |
| 3 |
|
| 4 |
The grammar is small and simple, but exhibits prepositional phrase attachment |
| 5 |
ambiguity. |
| 6 |
|
| 7 |
Example: "the man saw the race with a telescope" |
| 8 |
Can be bracketed as the following |
| 9 |
(a) "the man saw (the race with a telescope)" |
| 10 |
(b) "(the man saw the race) with a telescope" |
| 11 |
|
| 12 |
Note: the "lexicon" contains some ambiguous words too - see if you can extend |
| 13 |
the grammar so this comes into play. |
| 14 |
|
| 15 |
|
| 16 |
"make run" to run the test case. |
| 17 |
|
| 18 |
For Hugs, load up Hugs.lhs - it is a simplified version, with entry point |
| 19 |
"test :: String -> IO ()" |