正在加载图片...
举例2 训练数据: <s0><s> He can buy you the can of soda </s Unigram: (8 words in vocabulary p1(He)=p1(buy)=p1(you)=p1(the)=pof) p1(oda)=.125,p1(can)=.25 Bigram p2(Hek<s>)=1, p2(can He)=1, p2(buylcan)=5, p2(of]can 5, p (you buy)=1,. Trigram p3(Hek<s0>, <s>)=1, p3(can<s>,He)=l, p3(buy He, can) 2 p3(ofthe, can)=1,., p3(</s>of, soda Entropy:H(p1)=275,H(p2)=1,H(p3)=0举例2 • 训练数据: – <s0> <s> He can buy you the can of soda </s> – Unigram: (8 words in vocabulary) • p1 (He) = p1 (buy) = p1 (you) = p1 (the) = p1 (of) = p1 (soda)= .125, p1 (can) = .25 – Bigram: • p2 (He|<s>) = 1, p2 (can|He) = 1, p2 (buy|can) = .5, p2 (of|can) = .5, p2 (you |buy) = 1,... – Trigram: • p3 (He|<s0>,<s>) = 1, p3 (can|<s>,He) = 1, p3 (buy|He,can) = 1, p3 (of|the,can)= 1, ..., p3 (</s>|of,soda) = 1. – Entropy: H(p1 ) = 2.75, H(p2 ) = 1, H(p3 ) = 0
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有