Natural Language Processing For Prolog Programmers
Natural Language Processing For Prolog Programmers
net/publication/2476111
CITATIONS READS
59 4,370
3 authors, including:
All content following this page was uploaded by Stan Szpakowicz on 18 July 2014.
Reviewed by
Ken Barkerand Stan Szpakowicz
University of Ottawa
The title says it all: it is truly a textbook for Prolog programmers, for better and for
worse. It presents simple NLP for experienced Prolog programmers.
The book is written in a casual (occasionally quite casual) style and is eminently
readable if you are reasonably comfortable with Prolog. The presentation has a satis-
fying flow. The book feels well planned, and is certainly well executed, considering its
goals stated in the preface. Editing is admirably meticulous, formatting nearly flaw-
less. The many examples in Prolog are clear and work well. Prolog code for examples
is available by ftp. References are abundant and useful.
The book has nine chapters and two appendices:
1. Natural language
2. Templates and keywords
3. Definite-clause grammars
4. English phrase structure
5. Unification-based grammar
6. Parsing algorithms
7. Semantics, logic, and model theory
8. Further topics in semantics
9. Morphology and the lexicon
A. Review of Prolog
B. String input and tokenization
Chapter I offers a definition of NL and NLP, and a review of the usual linguistic strata.
It also advocates Prolog as an NLP tool. Chapter 2 offers a pattern-matching approach
to NL interfaces to operating systems and databases. Chapter 3 introduces parse trees,
phrase-structure rules, and Prolog's DCG notation; the chapter also hints at parsing
and semantic analysis (treated separately in Chapters 6, 7, and 8). Chapter 4 devel-
ops a set of phrase-structure rules for the main English parts of speech; it also goes
beyond phrase-structure rules and gives a simple presentation of ID/LP rules and
transformational grammar. Chapter 5 introduces a unification-based grammar formal-
ism and an extension to Prolog for this. Chapter 6 describes and compares top-down,
bottom-up, left-corner, and chart parsing as well as Earley's algorithm. Chapter 7 of-
fers techniques for representing, in Prolog, knowledge from English sentences. Chap-
137
Computational Linguistics Volume 22, Number 1
This is not, perhaps, a format that stimulates deeper understanding. Solutions thrust
upon the reader risk being memorized without due generalization.
The exercises are heavily biased towards Prolog. Too many of them are actually
Prolog problems with little to do with linguistics. Some of them ask the reader to
figure out why some piece of Prolog code works. This usually requires a good knowl-
edge of Prolog and maybe even Prolog implementations. Nothing to it, if you are a
Prolog programmer (fair enough; just recall the book's title) and you are willing to
buy off-the-shelf components and refrain from delving into the underlying theories
and algorithms.
Numerous exercises call for maintaining or enlarging the author's ready-made
solutions. The reader is not really expected to come up with her own ideas: there is
138
Book Reviews
Ken Barker is a doctoral student in computational linguistics at the University of Ottawa. His the-
sis deals with building semantic networks from parse trees in Prolog in the absence of precoded
semantic knowledge. He has published one journal paper and three conference papers. Stan
Szpakowicz is a professor of Computer Science at the University of Ottawa. His research inter-
ests include text analysis for knowledge acquisition. He has published about 80 refereed papers
and four books. The authors' address is: Department of Computer Science, University of Ottawa,
Ottawa, Ontario, Canada KIN 6N5; e-mail: kbarker@csi.uottawa.ca and szpak@csi.uottawa.ca.
139
View publication stats