60 likes | 217 Views
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 15 (03/03/06) Prof. Pushpak Bhattacharyya IIT Bombay. Prolog Tutorial. Prolog. Prolog does unification, given facts and rules. Rules are specified in the form of Horn clauses. Prolog does Top down parsing.
E N D
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 15 (03/03/06)Prof. Pushpak BhattacharyyaIIT Bombay Prolog Tutorial
Prolog • Prolog does unification, given facts and rules. • Rules are specified in the form of Horn clauses. • Prolog does Top down parsing.
Commands • consult(user) – to provide input on the prompt directly. • ^D – exit from entering predicate • listing. – list all the entered clauses. • trace. – show the trace path while unification.
Exercise • Perform Union and Intersection of two lists. • Tools: • SWT Prolog • Definite Clause Grammar (DCG)