COMP5423 Natural Language Processing Lecture 1
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
COMP5423 Natural Language Processing
Lecture 1: N-Gram Language Models
Thursday, 13 January, 2023
Exercise 1:
Given the following Bi-gram probability table, if the probability that “i” is the first word in a sentence is 0.25 and the probability that “food” is the last word in a sentence is 0.68, what is the probability of (i want Chinese food)?
|
i |
want |
to |
eat |
Chinese |
food |
i |
0.002 |
0.33 |
0 |
0.0036 |
0 |
0 |
want |
0.0022 |
0 |
0.66 |
0.0011 |
0.0065 |
0.0065 |
to |
0.00083 |
0 |
0.0017 |
0.28 |
0.00083 |
0 |
eat |
0 |
0 |
0.0027 |
0 |
0.021 |
0.0027 |
Chinese |
0.0063 |
0 |
0 |
0 |
0 |
0.52 |
food |
0.014 |
0 |
0.014 |
0 |
0.00092 |
0.0037 |
Exercise 2
Apply the Tri-gram model to re-write the formula of (i want Chinese food).
2023-03-27
N-Gram Language Models