CSCI 587 - Lecture 12 Parse Trees in Prolog
- Session in SWI Prolog (pl1.5)
- Only on DECstations for now!
- command pl1.5 (P-L-one.five)
- /usr/local/bin/pl1.5 (You may need to change your path. Ask how!)
- consult( file).
- establish goals to "run" the program
- Help
- help(assert).
- help(3-4).
- apropos(pattern).
- ^D
- NLP in Prolog: nlp2
- np(X,Y) means there is a noun phrase at the front of the list X
and the remainder of the input after the noun phrase is Y
- Dictionary lookup for lexical items
- noun([W|R], R) :- W = dog.
- cat(noun,dog).
- noun(dog).
- Prolog Traces: appendScript, nlp2Script
- member function
- Simple Output: print, nl
- Looping predicates: fail, repeat
- Format of parse tree in list
- nlp3
- Functor notation
book(author, title, publisher, city, state)
- Readings
- Sections 3.8
- Prolog examples in /class/csci587/Prolog : nlp3, nlp4
- Previous Lecture -
- Next Lecture -
URL = http://sourgum.cs.sc.edu/~matthews/Courses/587/Lectures/lecture12.html