Richter:
Logic Programming for Grammar Implementations (WS 07/08)
General Information on the Course
- Course Description in the Kommentierte Vorlesungsverzeichnis (German)
-
Information Sheet (distributed in class)
-
Classes:
Our class meets Wednesdays, 14ct-15.45 (Seminarraum, 1.13), and Thursdays, 9ct-10.45 (Brechtbau, 0.35 -- changed from Friday at the same
hour in Seminarraum 1.13).
The course language is English.
- Office Hours:
Tuesdays, 10.00-11.00, SfS, Room 2.17 (Email: f.richter@em.uni-frankfurt.de)
- Official statement to
be included (and signed) in every Schriftliche Hausarbeit or
written summary
Preliminary List of Course Readings
- Michael A. Covington (1994): Natural Language Processing for Prolog Programmers. Prentice Hall, Englewood Cliffs, NJ 07458
- Michael A. Covington, Donald Nute, André Vellino (1997): Prolog Programming in Depth. Prentice Hall. Upper Saddle River, NJ 07632
- Gerald Penn et al. (2003): ALE. The Attribute Logic Engine. User's Guide with TRALE Extensions.
- Leon Sterling, Ehud Shapiro (1994): The Art of Prolog. The MIT Press
Software and Manuals
- SWI-Prolog
- SICStus Prolog
- Using TRALE in the computer pool (installation based on SICStus 3.12.8
and Java 1.6):
- Add the following two directories to your PATH variable:
/afs/sfs/lehre/fr/newtrale/bin
/afs/sfs/lehre/fr/gralej/bin
- Start a TRALE session in shells in which these paths are set by
typing:
- gralej &
- newtrale -f localhost 1080 &
The first step starts the graphical interface, the second starts TRALE and
connects TRALE to the interface.
- Using the Source Level Debugger in this version of TRALE:
- Type at the PROLOG prompt: 'ale_flag(debugger,_,on).'
- Compile the grammar using 'dcompile_gram(< name_of_grammar_file >).'
- The parse predicate is drec/1.
- Using an older version of TRALE (for the Zebra Puzzle) in the computer pool:
- In addition to the foregoing, also add the following directory to your PATH variable:
/afs/sfs/home/milca/a4/bin
- Start a TRALE session in shells in which this path is set by
typing:
- gralej &
- trale -f localhost 1080 &
Do not use this version of TRALE with grammars, it will not behave
as expected.
- Use of Source Level Debugger (for dquery/1):
'dcompile_gram(< name_of_grammar_file >)'
Hand-outs, Slides, TRALE files
- Syllabus
- Michael Covington's toy grammar of English in TRALE:
signature file (signature),
theory file (theory.pl)
- A grammar of anbncn in TRALE:
signature file (signature),
theory file (theory.pl)
- The Zebra Puzzle (User's Guide, page 34):
Three different houses each contain a different pet, a different
drink, and an inhabitant of a different nationality. The following
six facts are true about these houses:
- The man in the third house drinks milk.
- The Spaniard owns the dog.
- The Ukranian drinks the tea.
- The Norwegian lives in the first house.
- The Norwegian lives next to the tea-drinker.
- The juice-drinker owns the fox.
Who owns the zebra? Who drinks juice?
In TRALE:
signature file (signature),
theory file (theory.pl)
- Separate
webpage with links to the grammars of
of
A Web-based Course in Grammar Formalisms and Parsing,
adapted to the new TRALE system
- Oral Presentations - A Practical Guide
Student Presentations
Homework Assignments
- Thursday, November 22nd:
- Extend the predicate flatten/2 in such a way that it removes
duplicates and returns a sorted list of integers (or letters) in
increasing (or alphabetical) order.
- Make yourself familiar with the predicates substitute/4 and
ground_n/1 by tracing appropriate examples. The predicates are
defined in the files
termstructure-predicates.pl
and
ground.pl.
- Generalize the predicate substitute/4 to a treatment of
non-ground terms.
A few relevant websites
- at the SfS:
- at the Universität Tübingen:
- elsewhere in the world:
Frank Richter