% ========================================================================== % $Id: dcg.pl,v 1.1 2014/02/13 05:47:10 jlang Exp $ % CSI2120 example Code for lecture 9 % ========================================================================== % (C)opyright: % % Jochen Lang % EECS, University of Ottawa % 800 King Edward Ave. % Ottawa, On., K1N 6N5 % Canada. % http://www.eecs.uottawa.ca/~jlang % % Creator: jlang (Jochen Lang) based on Clocksin & Mellish % Email: jlang@eecs.uottawa.ca % ========================================================================== % $Log: dcg.pl,v $ % Revision 1.1 2014/02/13 05:47:10 jlang % Added grammar examples for lecture 9. % % ========================================================================== sentence --> noun_phrase, verb_phrase. noun_phrase --> determiner, noun. verb_phrase --> verb. verb_phrase --> verb, noun_phrase. determiner --> [the]. determiner --> [a]. noun --> [tomato]. noun --> [bird]. noun --> [man]. noun --> [cat]. verb --> [eats]. verb --> [sings]. verb --> [loves].