Presentation is loading. Please wait.

Presentation is loading. Please wait.

Final Exam 438/538 Instructions –538 Answer all questions –438 You may omit one question –Answers email (one file only, no attachments) state name and.

Similar presentations


Presentation on theme: "Final Exam 438/538 Instructions –538 Answer all questions –438 You may omit one question –Answers email (one file only, no attachments) state name and."— Presentation transcript:

1 Final Exam 438/538 Instructions –538 Answer all questions –438 You may omit one question –Answers email (one file only, no attachments) state name and 438 or 538 diagrams may be submitted on paper (name) if diagram submitted, indicate in the file

2 FST Give a deterministic (input character by input character) FST in Prolog that maps numbers 0, 1–9, 10–29 (presented as a sequence of digits followed by an end character $) into Japanese (romaji format) –Examples: input: [0,$] output: rei (1 = ichi, 2 = ni, 3 = san, 4 = yon, 5 = go, 6 = roku, 7 = nana, 8 = hachi, 9 = kyu) [1,0,$] ju [1,4,$] ju yon (14 = 10 followed by 4) works for 11–19 [2,0,$] ni ju [2,4,$] ni ju yon (24 = two followed by ten followed by 4) works for 21–29 –Give examples of runs

3 N-grams and Probability Compute the probability of the sentence –START Bristol-Myers and Sun Microsystems agreed to merge. –using the bigram approximation to the chain rule and ADD ONE smoothing –given bigram frequency data shown in file bigram.txt –assume 9482 different words –START = start of sentence Submit your answer –write out equations –solve for answer –NB. case sensitive (bigrams) Examples START<>Bristol<>5 3071 Bristol<>Myers<>27 29 agreed<>to<>25 27 Key –W1<>W2<>N1 N2 –W1 = first word –W2 = second word –N1 = bigram frequency of W1 W2 –N2 = unigram frequency of W1

4 DCG Sentences with reflexives –John saw himself/*herself –Mary saw *himself/herself –Mary saw John’s picture of himself/*herself –John saw Mary’s picture of *himself/herself Give a DCG grammar that builds parse trees for these sentences –use extra arguments to encode relevant features

5 LR Parsing Build the dotted rule FSA associated with the grammar: –S → NP VP –NP → D N –NP → N –VP → V NP Show the steps, i.e. actions: (shift, reduce) and states visited, involved in parsing the sentence the man saw John assuming –D → the, N → man, N → John, V → saw

6 WordNet Use WordNet online to discover –http://wordnet.princeton.edu/perl/webwnhttp://wordnet.princeton.edu/perl/webwn –What do the following words share in common? nose, face, eye, mouth, chin –But do not share with: ear, lips, eyebrow –Explain your answer.


Download ppt "Final Exam 438/538 Instructions –538 Answer all questions –438 You may omit one question –Answers email (one file only, no attachments) state name and."

Similar presentations


Ads by Google