L3

Horatio:
A Middle-sized NLP Application in Prolog

Archibal Michiels
198 p.
1995
ISBN 2-87233-015-1
€ 12.50

Click here for reviews.

There is no dearth of books – some of them excellent – on Prolog and Natural Language Processing. But they tend to remain at an elementary level and to discuss only short introductory programs. None of them describes and gives the full code of a medium-sized application.
This is precisely what this book does. HORATIO is a middle-sized application in the field of natural language analysis and generation. The full source code, with numerous comments, is to be found on the disk distributed with the book.
No pseudo-code is given. No piece of code is presented in a simplified form. Cited code always corresponds exactly to the runnable code to be found on the companion disk. A careful study of this book will bring the reader to a stage where he will have mastered not only the general design decisions, but also the interactions between the various components of the grammar and the coding idioms and mechanisms in full detail. The hard step from elementary to advanced NLP applications in Prolog is due to the need for managing the interactions between various ‘solutions’, which are all beautifully simple when looked at in isolation but display the irritating tendency not to mesh with their neighbours as readily as one would wish.

 

Reviews

N. Curteanu (Iasi), Zentralblatt für Mathematik und ihre Grenzgebiete 863/97, p. 477.

HORATIO is a wonderful toy: a large and complex Prolog program devoted for both beginners and experts in natural language (NL) processing (NLP) and Prolog programming. Archibal Michiels provides the complete Prolog code for the NL analysis (HORATIO) and generation (HORAGEN), this fact offering the unique opportunity for intensive learning of Prolog language, in the context of NL grammar design, parsingstrategy, lexicon representation and organization, generation algorithm, interaction between components of the grammar, various coding idioms etc. The emphasis throughout the book falls on NL grammar writing, using standard Prolog and standard DCG notation, and dealing with parsing and generation of "linguistic" rather than "real-life" NL sentences. The interest of HORATIO focuses on explaining the strategies, methods, and solutions, and how they are linked the NLP tasks. HORATIO is a lexicon- driven and surface (thus syntactically) oriented system, the depth level of its parses being more adequate to tasks such as machine translation between fairly closely related NLs. The transformation of HORATIO from a pedagogical tool into a real-world system could be an exiting challange to any NLP, Prolog team.

 

Michael A. Covington (University of Georgia), Computational Linguistics Vol. 22 Number 2 (1996), pp. 281-282.

HORATIO is a moderately-wide-coverage English parser developed in Arity Prolog on a PC and based on Michael McCord's slot grammars. Its output includes explicit grammatical relations such as subject and object, and some lexical disambiguation is performed by using argument properties such as human and abstract. Performance is respectable; on my 66-MHz 486, each sentence in the test suite took no more than a few seconds, including complex sentences such as Devito manages a programmer Abrams interviewed and Browne hired.
      Noteworthy features of HORATIO include a lexicon derived (by the awk program) from an on-line version of the Longman Dictionary of Contemporary English; a parsing technique that avoids looping on coordinate structures; provisions for idioms with different degrees of syntactic opacity; a mechanism to handle word-order variation; and a generation facil- ity.
      The book documents HORATIO in detail: "No pseudo-code is given. No piece of code is presented in a simplified form. Cited code always corresponds exactly to the runnable code to be found on the companion disk" (p. 5). (1)
      The diskette does indeed contain the source code, executables, and test suite, entire. The user can verity that HORATIO works as advertised, give it additional sentences to parse, and use it as the basis of further work (taking due note of the copyright, of course). Porting from Arity Prolog to other implementations should be straightforward.-

(1) The code may also be downloaded free of charge from http://engdep1.philo.ulg.ac.be.

Back to L3 books