I want to treat myself with some dead-tree book from Amazon, what are your recommendations? My main interests are compilers and good old-fashioned AI, but anything Prolog-related that you have enjoyed is welcome!
O’Keefe, The Craft of Prolog has chapters on grammar rules, tokenisers, and interpreters.
Plus general good advice on Prolog programming by one of the best.
Prolog and Natural-Language Analysis is my preferred, and it focuses almost exactly on the arguments you listed.
After a mild introduction to Prolog programming, you find a brief but intense session on the logical (mathematical) foundation of the language, then some DCG applications for NLP, and then a very clear explanation of Richard Montague grammar. The final chapter highlights performance related topics, like partial execution, bottom-up parsing, etc.
To be true, I don’t know if the book is available on Amazon, I read it many years ago in the italian translation…
I’m liking several that I bought below, especially Art of Prolog and Craft of Prolog. Here are some more to consider:
- CHR is good although not Prolog per se. I’m sure it will become relevant when I become a Prolog expert.
- Art of Prolog is available as ebook for free from MIT Press.
- The 3rd one in my screenshot is a bunch of research papers that I still need to digest. I’m sure they have some hidden gems.
One more: Logic Grammars by Harvey Abramson, Veronica Dahl
Half the book is about variants of DCGs for parsing and interpreting (including top-down and bottom-up), the other half is more advanced stuff for linguistics (discontinuous grammars, context-sensitive grammars, free word order, etc.). It’s a bit old (1989); I don’t how much research has been done since then (for example, there’s this, which goes much more into syntax/semantics of natural languages: Text Understanding in LILOG | SpringerLink)

