Source: http://www.macc.mcmaster.ca/maccfiles/chachuatnotes/11-NLP-II_handout.pdf