HOMEWORK 2 (CS 2731 / ISSP 2230)

Assigned: October 4, 2013

Due: October 22, 2013 (midnight)

There are both written and programming parts to this homework. The written part will be turned in via CourseWeb to facilitate automatic grading.

1. Multiple Choice (30 points)

In CourseWeb, there is now a Course Documents link under the Syllabus link in the top/lefthand box. When you click on Course Documents, the folder's contents will appear on the main part of the screen - currently "HW2: Written Questions." Click on that.

This multiple choice part of the homework will be automatically graded. You can only submit your answers once, which will trigger the grading. I will go over the answers in class after the assignment deadline has passed.

2. Programming (70 points)

2.1 HMM Decoding (Viterbi) (35 points)

An example of the model file for Figure 6.3 (Comments shown here are NOT part of the file), download it from here.
Alphabet
3				#number of alphabets
1	2	3		#alphabets, split by '\t'

States
2				#number of states
HOT	COLD			#states, split by '\t'

StartProbability		#prior probabilities of the states, the order is the same as before
0.8	0.2

TransitionProbability		#transition probability matrix(T), N*N, N is the number of states, T[i][j] = p(s_j|s_i)
0.7	0.3
0.4	0.6

EmissionProbability		#emission probability matrix(E), N*M, N is the number of states, M is the number of alphabets. E[i][j] = p(a_j|s_i)
0.2	0.4	0.4
0.5	0.4	0.1

2.2 Parsing (Earley) (35 points)

An example of the grammar file for Figure 13.1, download it from here.
Grammar
S->NP VP
S->Aux NP VP
S->VP
NP->Pronoun
NP->Proper-Noun
NP->Det Nominal
Nominal->Noun
Nominal->Nominal Noun
Nominal->Nominal PP
VP->Verb
VP->Verb NP
VP->Verb NP PP
VP->Verb PP
VP->VP PP
PP->Preposition NP

Lexicon					#grammar and lexicon are split by a blank line
Det->that|this|the|a
Noun->book|flight|meal|money
Verb->book|include|prefer
Pronoun->I|she|me
Proper-Noun->Houston|NWA
Aux->does
Preposition->from|to|on|near|through


Submission Procedure

The submission should be done using the Assignment Tool in CourseWeb/ Blackboard. The file should have the following naming convention: pittID_hw2.zip (ex: dlitman_hw2.zip). The required outputs, the code, and a readme file to run your code should be submitted inside the archived folder. Clarification 10/22: Please include in your README some explanation of your code to demonstrate that you wrote this code (e.g. you could specify how specific parts of your actual code correspond to each specific part of the psuedocode, what you did to flesh it out etc.).

The date in CourseWeb will be used to determine when your assignment was submitted (to implement the late policy).