码迷,mamicode.com
首页 > 其他好文 > 详细

N_grams 简介

时间:2015-04-09 17:19:05      阅读:99      评论:0      收藏:0      [点我收藏+]

标签:

Introduce probabilistic language modeling

let‘s thinking about the probability of sentence.

$P(w_1, w_2, w_3, w_4) \\= P(w_1, w_2, w_3) * P(w_4| w_1, w_2, w_3) \\= P(w_1, w_2) * P(w_3| w_1, w_2) * P(w_4| w_1, w_2, w_3) \\= P(w_1) * P(w_2| w_1) * P(w_3| w_1, w_2) * P(w_4| w_1, w_2, w_3)$

 

Markov Assumption

$ P(w_1, w_2, w_3, w_4...w_n) = P(w_n) * P (w_n| w_k, w_{k+1}\cdots w_n)$

for example

$P(w_1, w_2, w_3, w_4)\\= P(w_1, w_2, w_3) * P(w_4|w_3)\\= P(w_1, w_2) * P(w_3|w_2) * P(w_4| w_3)\\= P(w_1) * P(w_2| w_1) * P(w_3|w_2) * P(w_4|w_3)$

Then it is easier.

And there are N-grams, 3-grams, 4-grams.

N_grams 简介

标签:

原文地址:http://www.cnblogs.com/ZJUT-jiangnan/p/4409959.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!