Natural Language Processing · 免费预览

n元语法语言模型与马尔可夫假设

句子概率的链式法则分解、马尔可夫简化、基于计数的最大似然估计,以及对数空间运算。

1. N-gram Language Models and the Markov Assumption

N-gram Language Models and the Markov Assumption

2. Estimating n-gram probabilities by relative frequency

Estimating n-gram probabilities by relative frequency

3. A bigram model over a small logbook corpus

A bigram model over a small logbook corpus

4. One bigram estimate

In a corpus the word "fog" occurs 90 times, and the sequence "fog horn" occurs 12 times. What is the maximum likelihood estimate of P(horn∣fog)P(\text{horn} \mid \text{fog})? Give the answer rounded to three decimal places.

5. Multiplying conditionals

A bigram model assigns these probabilities along the sentence "the harbour lights burn": 0.4 0.2 0.25. What probability does the model give the whole sentence? Use five decimal places.

6. Adding log probabilities

A model stores four factor probabilities as natural logs: -3.45, -3.07, -1.7, -3.82. What is the sum of the log probabilities, and hence the log of the sentence probability? Give the log-space total rounded to two decimals.

7. A ratio from a real count table

A corpus consists of these sentences: the tide turns; fog hides the buoys; the fog lifts. Every sentence is padded with a start symbol ⟨s⟩\langle s\rangle and an end symbol ⟨/s⟩\langle /s\rangle. Compute P(tide∣the)P(tide \mid the) under the bigram MLE. Use three decimals.

8. Scoring a padded sentence

With the same corpus (the tide turns; fog hides the buoys; the fog lifts, padded with boundary symbols), what probability does the bigram model assign to the sentence "the fog lifts" including its boundary symbols? Round to four decimals.

进入交互式练习

免费注册 · 即时批改 · 自动安排间隔复习。

免费开始这门课