Logic Programming for Linguistics:
A short introduction to Prolog, and Logic Grammars with Constraints as an easy way to Syntax and Semantics

by Henning Christiansen
     Research group PLIS: Programming, Logic and Intelligent Systems
     Department of Communication, Business and Information Technologies
     Roskilde University, Denmark

© this and all files by the author linked below, Henning Christiansen, 2010
Permission is granted to download copies for personal use or teaching provided that correct reference is given. Do not publish on your own website but link to this page.

This article gives a short introduction to get started with logic programming in Prolog that do not require any previous programming experience. The presentation is aimed at students of linguistics, but it does not go deeper into linguistics than any student who has some ideas of what a computer is, can follow the text. Our approach differs from the traditional ones by including constraint-based techniques which makes it possible, in a surprisingly straightforward way, to characterize and analyze pragmatic-semantic phenomena by so-called abductive reasoning.

It is written after a talk given for students at GRLMC, Research Group on Mathematical Linguistics, Universitat Rovira i Virgili, Cataluña (Spain), in 2009. It is strongly inspired by an invited tutorial given at Linguistics and Formal Linguages, Second International Workshop on Non-Classical Formal Languages in Linguistics, ForLing 2008, also taking place at GRLMC. The author expresses his thanks to the students and good colleagues in Tarragona and elsewhere who have influenced this material.

Download article: here!
NB: The article will be printed in a book; correct reference will appear here soon.

Example files

The following example programs are used in the article. You can view them your browser or download as text file (right click / control-click); do not download the 'view' version as you will get a lot of html rubbish, but you can copy-paste from it.


This web site maintained by Henning Christiansen, 04-may-2010