| |
COMP348 Document Processing and the Semantic Web
Practical, Week 8
If you run out of time, attempt at least the exercises marked in
boldface.
Part-of-Speech Tagging
There is an NLTK
tutorial for PoS tagging.
-
Read Sections 4.1 and 4.2 as a complement to discussion in lectures on
the concept.
-
Do exercise 2 of section 4.2.5.
-
Read Section 4.3. Try out the regular expression tagger of
Section 4.3.2 on some sentences.
-
Do exercises 5 and 6 from Section 4.3.3.
-
Read Section 4.4.
Parsing
The NLTK toolkit contains
a tutorial on parsing
and a tutorial
on chart parsing.
-
Read Section 8.5 (you may skip 8.5.3). Examine the behaviour
of the shift-reduce parser (a bottom-up parser) and the
recursive descent parser (a top-down parser) by calling the
demos.
-
Based on the examples of context-free grammars that we have
seen in the lectures and in the tutorials, write a small
context-free grammar and lexicon. In particular, write a grammar
that will cover the following sentences:
- He is a lazy man.
- The very tall man stopped the car.
- All rhododendrons are red.
-
Parse the sentences with the shift-reduce parser, the
recursive descent parser, and the chart parser (bottom-up
approach). Use the trace mechanism to compare the process
of parsing using each method.
Mark Dras or
|