<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>《Beautiful Data-统计语言模型的应用三：分词6》的评论</title>
	<atom:link href="http://www.52nlp.cn/beautiful-data-%e7%bb%9f%e8%ae%a1%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b%e7%9a%84%e5%ba%94%e7%94%a8%e4%b8%89%e5%88%86%e8%af%8d6/feed" rel="self" type="application/rss+xml" />
	<link>http://www.52nlp.cn/beautiful-data-%e7%bb%9f%e8%ae%a1%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b%e7%9a%84%e5%ba%94%e7%94%a8%e4%b8%89%e5%88%86%e8%af%8d6</link>
	<description>I Love Natural Language Processing</description>
	<lastBuildDate>Sun, 05 Feb 2012 11:54:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>作者：52nlp</title>
		<link>http://www.52nlp.cn/beautiful-data-%e7%bb%9f%e8%ae%a1%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b%e7%9a%84%e5%ba%94%e7%94%a8%e4%b8%89%e5%88%86%e8%af%8d6/comment-page-1#comment-910</link>
		<dc:creator>52nlp</dc:creator>
		<pubDate>Mon, 05 Apr 2010 14:39:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.52nlp.cn/?p=3219#comment-910</guid>
		<description>这个会在这一节之后提到！
谢谢navygong的热心回答，毕竟一个人的力量是有限的！
PS：清明出游刚回来，抱歉。</description>
		<content:encoded><![CDATA[<p>这个会在这一节之后提到！<br />
谢谢navygong的热心回答，毕竟一个人的力量是有限的！<br />
PS：清明出游刚回来，抱歉。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：navygong</title>
		<link>http://www.52nlp.cn/beautiful-data-%e7%bb%9f%e8%ae%a1%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b%e7%9a%84%e5%ba%94%e7%94%a8%e4%b8%89%e5%88%86%e8%af%8d6/comment-page-1#comment-907</link>
		<dc:creator>navygong</dc:creator>
		<pubDate>Mon, 05 Apr 2010 13:40:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.52nlp.cn/?p=3219#comment-907</guid>
		<description>candidates实际上是个generator(生成器)，你提到的这两行代码就是计算每种候选分词方式的概率，并从中取概率最大的那种。如&quot;wheninthecourse&quot;可能的分词方式有
[&#039;w&#039;, &#039;henin&#039;, &#039;the&#039;, &#039;course&#039;]
[&#039;wh&#039;, &#039;en&#039;, &#039;in&#039;, &#039;the&#039;, &#039;course&#039;]
[&#039;whe&#039;, &#039;n&#039;, &#039;in&#039;, &#039;the&#039;, &#039;course&#039;]
...
[&#039;wheninthecour&#039;, &#039;se&#039;]
[&#039;wheninthecours&#039;, &#039;e&#039;]
[&#039;wheninthecourse&#039;]。
以[&#039;wh&#039;, &#039;en&#039;, &#039;in&#039;, &#039;the&#039;, &#039;course&#039;]为例，Pwords函数作用到这个列表上后得到的是各个词出现的概率的乘积。然后用max函数取出最大乘积的那种候选分词方式。
PS：如果你对Python熟悉应该很好理解。</description>
		<content:encoded><![CDATA[<p>candidates实际上是个generator(生成器)，你提到的这两行代码就是计算每种候选分词方式的概率，并从中取概率最大的那种。如”wheninthecourse”可能的分词方式有<br />
['w', 'henin', 'the', 'course']<br />
['wh', 'en', 'in', 'the', 'course']<br />
['whe', 'n', 'in', 'the', 'course']<br />
&#8230;<br />
['wheninthecour', 'se']<br />
['wheninthecours', 'e']<br />
['wheninthecourse']。<br />
以['wh', 'en', 'in', 'the', 'course']为例，Pwords函数作用到这个列表上后得到的是各个词出现的概率的乘积。然后用max函数取出最大乘积的那种候选分词方式。<br />
PS：如果你对Python熟悉应该很好理解。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：我是一头驴子</title>
		<link>http://www.52nlp.cn/beautiful-data-%e7%bb%9f%e8%ae%a1%e8%af%ad%e8%a8%80%e6%a8%a1%e5%9e%8b%e7%9a%84%e5%ba%94%e7%94%a8%e4%b8%89%e5%88%86%e8%af%8d6/comment-page-1#comment-906</link>
		<dc:creator>我是一头驴子</dc:creator>
		<pubDate>Mon, 05 Apr 2010 07:38:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.52nlp.cn/?p=3219#comment-906</guid>
		<description>if not text: return []
    candidates = ([first]+segment(rem) for first,rem in splits(text))
    return max(candidates, key=Pwords)
楼主这个max(candidates,key=Pwords)能给解释一下吗？
candidates应该是个序列，Pwords在BeautifulData中的源码中是有参数的，怎么可以这么用？</description>
		<content:encoded><![CDATA[<p>if not text: return []<br />
    candidates = ([first]+segment(rem) for first,rem in splits(text))<br />
    return max(candidates, key=Pwords)<br />
楼主这个max(candidates,key=Pwords)能给解释一下吗？<br />
candidates应该是个序列，Pwords在BeautifulData中的源码中是有参数的，怎么可以这么用？</p>
]]></content:encoded>
	</item>
</channel>
</rss>

