自然语言处理中的概率模型与文本分类
1. 马尔可夫假设与 n - 元语言模型
1.1 马尔可夫假设
马尔可夫假设认为,链中的随机事件仅有条件地依赖于有限数量的前序事件。根据条件依赖的前序事件数量,二元语言模型呈现为一阶马尔可夫链,三元语言模型呈现为二阶马尔可夫链。
1.2 不同 n - 元语言模型的对比
通过使用不同的 n - 元语言模型生成莎士比亚戏剧脚本的示例输出,我们可以直观地对比一元、二元和三元语言模型。以下是具体的示例表格:
| 模型 | 示例输出 |
| — | — |
| 一元模型 | out this like there A gainst me you, made?
he C upid to thou too thee My he tricks that heart one thing face as not fear she on face A then
A ll my sometime like himself, – W hat’ s master. |
| 二元模型 | A s much good news? tell you foolish thought.
C an it like a man whom there but it is eaten up Lancaster and it, sir? A way! why
W here is the lady of the house of Y ork. |
| 三元模型 | My servant, A riel, thy blood and made to understand you,
超级会员免费看
订阅专栏 解锁全文
1889

被折叠的 条评论
为什么被折叠?



