<?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>Comments on: 利用Lucene制作中文搜尋應用</title>
	<atom:link href="http://www.reality.hk/articles/2005/03/16/382/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reality.hk/articles/2005/03/16/382/</link>
	<description>Reality is merely an illusion, albeit a very persistent one.</description>
	<lastBuildDate>Wed, 10 Mar 2010 04:41:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Gary</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-57637</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Tue, 22 Jul 2008 04:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-57637</guid>
		<description>&quot;它的算法很簡單：準備一本中文詞典，將輸入的文章的每一字逐字和詞典比較，順序地找文章中可以對應詞語。&quot;

請問,能否提供一份中文詞典? 謝謝.</description>
		<content:encoded><![CDATA[<p>&#8220;它的算法很簡單：準備一本中文詞典，將輸入的文章的每一字逐字和詞典比較，順序地找文章中可以對應詞語。&#8221;</p>
<p>請問,能否提供一份中文詞典? 謝謝.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小影</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-57617</link>
		<dc:creator>小影</dc:creator>
		<pubDate>Mon, 09 Jun 2008 15:04:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-57617</guid>
		<description>Dennis

之前確實沒有考慮 stopwords 帶來的問題。

絕對同意你的說法... 基本上如不是特殊的應用，我會選擇只用 bi-gram 了。固定的字典和簡單的算法解決不了人名、新詞的問題。使用全自動的方法又會有機會抓到一些攪笑或不能出街的詞...</description>
		<content:encoded><![CDATA[<p>Dennis</p>
<p>之前確實沒有考慮 stopwords 帶來的問題。</p>
<p>絕對同意你的說法&#8230; 基本上如不是特殊的應用，我會選擇只用 bi-gram 了。固定的字典和簡單的算法解決不了人名、新詞的問題。使用全自動的方法又會有機會抓到一些攪笑或不能出街的詞&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-57616</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Mon, 09 Jun 2008 12:42:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-57616</guid>
		<description>中文分詞不應該使用 stopwords

例如 &quot;是&quot; &quot;的&quot; &quot;和&quot;
它們都有各自再組成的詞語
&quot;是非&quot; &quot;的士&quot; &quot;和服&quot; 等等

但 stopwords 都是在分詞之前進行

而基另一個事實: 語言是活的
新詞/特有詞的出現會令到只使用字典算法的程式出問題; 不過其實一般來說 bi-gram + 常用詞典 雙重應用的分詞已經不太差</description>
		<content:encoded><![CDATA[<p>中文分詞不應該使用 stopwords</p>
<p>例如 &#8220;是&#8221; &#8220;的&#8221; &#8220;和&#8221;<br />
它們都有各自再組成的詞語<br />
&#8220;是非&#8221; &#8220;的士&#8221; &#8220;和服&#8221; 等等</p>
<p>但 stopwords 都是在分詞之前進行</p>
<p>而基另一個事實: 語言是活的<br />
新詞/特有詞的出現會令到只使用字典算法的程式出問題; 不過其實一般來說 bi-gram + 常用詞典 雙重應用的分詞已經不太差</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小影</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-57580</link>
		<dc:creator>小影</dc:creator>
		<pubDate>Tue, 01 Apr 2008 13:55:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-57580</guid>
		<description>如果索引用了分詞，查詢也同樣要分詞。</description>
		<content:encoded><![CDATA[<p>如果索引用了分詞，查詢也同樣要分詞。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kentsin</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-57579</link>
		<dc:creator>kentsin</dc:creator>
		<pubDate>Tue, 01 Apr 2008 13:48:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-57579</guid>
		<description>我想問一句， 不是應該對文件做索引是才需要分詞

查詢是否不需要分詞？其實簡單地將查詢處理就可以呢？</description>
		<content:encoded><![CDATA[<p>我想問一句， 不是應該對文件做索引是才需要分詞</p>
<p>查詢是否不需要分詞？其實簡單地將查詢處理就可以呢？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chian</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-21042</link>
		<dc:creator>Chian</dc:creator>
		<pubDate>Tue, 20 Mar 2007 09:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-21042</guid>
		<description>您好,

小弟最近正在找一些關於「詞庫」的資源，其中也包含了

「stopword」、「數字」、「人名」、「路名」等詞

請問您是否知道這方面的資源哪可取得呢？ 謝謝您。</description>
		<content:encoded><![CDATA[<p>您好,</p>
<p>小弟最近正在找一些關於「詞庫」的資源，其中也包含了</p>
<p>「stopword」、「數字」、「人名」、「路名」等詞</p>
<p>請問您是否知道這方面的資源哪可取得呢？ 謝謝您。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: reality &#187; Blog Archive &#187; 讓電腦學習詞語關系</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-12103</link>
		<dc:creator>reality &#187; Blog Archive &#187; 讓電腦學習詞語關系</dc:creator>
		<pubDate>Mon, 05 Feb 2007 15:20:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-12103</guid>
		<description>[...] 這種能力正是現在的電腦所缺乏的。別說理解整篇文章，單是把詞句分解成可理解的單位仍然未完全解決。沒錯己經有研究指出可以利用字典幫助分割文字，然而這仍不足夠。一方面語言不斷在變更，每天都有新詞誕生。通常我們有的字典都是經年累月編寫的，我們需要更齊全更新的字典。同時，我們學習文字並不是單獨地記憶的，見到一個詞語我們會聯想，我們懂得相關詞、同義詞、反義詞等關系。如果懂得利用上文下理和詞語的聯想，語言分析也許可以更簡單。 [...]</description>
		<content:encoded><![CDATA[<p>[...] 這種能力正是現在的電腦所缺乏的。別說理解整篇文章，單是把詞句分解成可理解的單位仍然未完全解決。沒錯己經有研究指出可以利用字典幫助分割文字，然而這仍不足夠。一方面語言不斷在變更，每天都有新詞誕生。通常我們有的字典都是經年累月編寫的，我們需要更齊全更新的字典。同時，我們學習文字並不是單獨地記憶的，見到一個詞語我們會聯想，我們懂得相關詞、同義詞、反義詞等關系。如果懂得利用上文下理和詞語的聯想，語言分析也許可以更簡單。 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qlqsh</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-9826</link>
		<dc:creator>qlqsh</dc:creator>
		<pubDate>Mon, 27 Nov 2006 10:35:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-9826</guid>
		<description>IndexSearcher is = new IndexSearcher(fsDir);这就是错误的位置，它连索引都无法打开，刚才忘说了。</description>
		<content:encoded><![CDATA[<p>IndexSearcher is = new IndexSearcher(fsDir);这就是错误的位置，它连索引都无法打开，刚才忘说了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qlqsh</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-9825</link>
		<dc:creator>qlqsh</dc:creator>
		<pubDate>Mon, 27 Nov 2006 10:33:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-9825</guid>
		<description>老大，救急问个问题。
我建了一个文字的索引。用的gbk编码保存的数据。但是当我的前台程序打开索引的时候，程序报错，无法打开索引。java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.search.IndexSearcher.(IndexSearcher.java:43)
at _jsp._phone._new_0search__jsp._jspService(phone/new_search.jsp:128)。但在我的系统的模拟情况下却没什么问题（我的是windows中文）。经过排查估计可能是保存的编码有问题（系统是Linux，英文编码），将索引保存的数据转换为utf8格式，不再报这个问题。我想知道这是为什么？有什么解决方法吗？</description>
		<content:encoded><![CDATA[<p>老大，救急问个问题。<br />
我建了一个文字的索引。用的gbk编码保存的数据。但是当我的前台程序打开索引的时候，程序报错，无法打开索引。java.lang.ArrayIndexOutOfBoundsException: -1<br />
at org.apache.lucene.search.IndexSearcher.(IndexSearcher.java:43)<br />
at _jsp._phone._new_0search__jsp._jspService(phone/new_search.jsp:128)。但在我的系统的模拟情况下却没什么问题（我的是windows中文）。经过排查估计可能是保存的编码有问题（系统是Linux，英文编码），将索引保存的数据转换为utf8格式，不再报这个问题。我想知道这是为什么？有什么解决方法吗？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 兔子</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-3722</link>
		<dc:creator>兔子</dc:creator>
		<pubDate>Thu, 19 Jan 2006 01:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-3722</guid>
		<description>版主我找到了，好康的東西，也讓你看一下吧。http://ccl.pku.edu.cn/doubtfire/Course/Chinese%20Information%20Processing/2002_2003_1.htm
現成的，嘿，挺適合我這懶蟲的...=.=</description>
		<content:encoded><![CDATA[<p>版主我找到了，好康的東西，也讓你看一下吧。http://ccl.pku.edu.cn/doubtfire/Course/Chinese%20Information%20Processing/2002_2003_1.htm<br />
現成的，嘿，挺適合我這懶蟲的&#8230;=.=</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 兔子</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-3719</link>
		<dc:creator>兔子</dc:creator>
		<pubDate>Tue, 17 Jan 2006 07:06:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-3719</guid>
		<description>小影多謝啊，可是我對這些程式一竅不通，目前亟需一款可以分析文字檔中用字頻率的。
嗚，沒時間自己寫（重點是對程式還只是門外漢而已），以後若有機會也會寫一些免費軟件供大家使用的，現在只想先找現成的來用，所以問了一下，多謝啊。</description>
		<content:encoded><![CDATA[<p>小影多謝啊，可是我對這些程式一竅不通，目前亟需一款可以分析文字檔中用字頻率的。<br />
嗚，沒時間自己寫（重點是對程式還只是門外漢而已），以後若有機會也會寫一些免費軟件供大家使用的，現在只想先找現成的來用，所以問了一下，多謝啊。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小影</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-3718</link>
		<dc:creator>小影</dc:creator>
		<pubDate>Tue, 17 Jan 2006 03:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-3718</guid>
		<description>Why not write one? If no lexicon is needed, it can be as simple as (in php) ...

function count_chinese($content) {
$content_len = mb_strlen($content);

for ($i=0; $i&lt;$content_len; $i++){
    $words[$j++] = mb_substr($content, $i, 1);
}

return array_count_values($words);
}

Of course you will need more logic on english/stopword, but it is still trivial. You may review my previous attempt &lt;a href=&quot;http://www.siuying.net/articles/2006/01/05/561/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; (not finished...).</description>
		<content:encoded><![CDATA[<p>Why not write one? If no lexicon is needed, it can be as simple as (in php) &#8230;</p>
<p>function count_chinese($content) {<br />
$content_len = mb_strlen($content);</p>
<p>for ($i=0; $i< $content_len; $i++){<br />
    $words[$j++] = mb_substr($content, $i, 1);<br />
}</p>
<p>return array_count_values($words);<br />
}</p>
<p>Of course you will need more logic on english/stopword, but it is still trivial. You may review my previous attempt <a href="http://www.siuying.net/articles/2006/01/05/561/" rel="nofollow">here (not finished&#8230;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 兔子</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-3710</link>
		<dc:creator>兔子</dc:creator>
		<pubDate>Mon, 16 Jan 2006 08:02:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-3710</guid>
		<description>請問站長，有沒有中文字頻分析的程式啊。譬如統計：一一二三，一（2）、二（1）、三（1）
我找了好久了，網路上有嗎？多謝阿</description>
		<content:encoded><![CDATA[<p>請問站長，有沒有中文字頻分析的程式啊。譬如統計：一一二三，一（2）、二（1）、三（1）<br />
我找了好久了，網路上有嗎？多謝阿</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小影</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-3342</link>
		<dc:creator>小影</dc:creator>
		<pubDate>Wed, 03 Aug 2005 05:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-3342</guid>
		<description>1. Yes. StandardAnalyzer is the standard implementation, CWordAnalyzer is my implementation

2. If you change the encoding, you need to redo the index before you can search them

I do not have QQ, you can contact me via siu [d o  t] ying [a t] gmail [d o t] com~</description>
		<content:encoded><![CDATA[<p>1. Yes. StandardAnalyzer is the standard implementation, CWordAnalyzer is my implementation</p>
<p>2. If you change the encoding, you need to redo the index before you can search them</p>
<p>I do not have QQ, you can contact me via siu [d o  t] ying [a t] gmail [d o t] com~</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 过客</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-3341</link>
		<dc:creator>过客</dc:creator>
		<pubDate>Wed, 03 Aug 2005 03:22:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-3341</guid>
		<description>麻烦你，再向你请教个问题
我是在eclipse下运行程序的，想用lucene基于词典检索中文，IndexWriter indexWriter= new IndexWriter(file,new SrandardAnalyzer(),true);这个语句中的分析器是不是要换成CWordAnalyzer（）？
我的存储文件的格式是ANSI的时候用StandardAnalyzer也可以，但是当我保存一文件是UTF-8格式后，就不能检索到这些文件，不知道什么原因
多谢解答，我是个初学者！</description>
		<content:encoded><![CDATA[<p>麻烦你，再向你请教个问题<br />
我是在eclipse下运行程序的，想用lucene基于词典检索中文，IndexWriter indexWriter= new IndexWriter(file,new SrandardAnalyzer(),true);这个语句中的分析器是不是要换成CWordAnalyzer（）？<br />
我的存储文件的格式是ANSI的时候用StandardAnalyzer也可以，但是当我保存一文件是UTF-8格式后，就不能检索到这些文件，不知道什么原因<br />
多谢解答，我是个初学者！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 过客</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-3339</link>
		<dc:creator>过客</dc:creator>
		<pubDate>Tue, 02 Aug 2005 03:35:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-3339</guid>
		<description>我还是不太明白
我的qq：30931347
能联系请教些问题吗？谢谢！</description>
		<content:encoded><![CDATA[<p>我还是不太明白<br />
我的qq：30931347<br />
能联系请教些问题吗？谢谢！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小影</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-3338</link>
		<dc:creator>小影</dc:creator>
		<pubDate>Mon, 01 Aug 2005 14:22:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-3338</guid>
		<description>分詞確是基於字典的，如下圖。

&lt;a href=&quot;/~siuying/images/lucene.png&quot;&gt;&lt;img src=&quot;/~siuying/images/lucene.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;

由query的輸出可以看見「這是一隻十分神秘的箱子」被分成了「一隻 十分 神秘 箱子」，基本的分詞和stop word還是有的。

我估計你遇到的問題是用了GB，是這個分詞是針對UTF-8的，要先將字碼轉換成UTF-8再index才有效！</description>
		<content:encoded><![CDATA[<p>分詞確是基於字典的，如下圖。</p>
<p><a href="/~siuying/images/lucene.png"><img src="/~siuying/images/lucene.png" alt="" /></a></p>
<p>由query的輸出可以看見「這是一隻十分神秘的箱子」被分成了「一隻 十分 神秘 箱子」，基本的分詞和stop word還是有的。</p>
<p>我估計你遇到的問題是用了GB，是這個分詞是針對UTF-8的，要先將字碼轉換成UTF-8再index才有效！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 过客</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-3337</link>
		<dc:creator>过客</dc:creator>
		<pubDate>Mon, 01 Aug 2005 03:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-3337</guid>
		<description>接上：还没有stopword的过滤！</description>
		<content:encoded><![CDATA[<p>接上：还没有stopword的过滤！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 过客</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-3336</link>
		<dc:creator>过客</dc:creator>
		<pubDate>Mon, 01 Aug 2005 03:27:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-3336</guid>
		<description>你的lucene中文分词有三个包，cn，cw，cjk，按照你说的你的cw实现了基于词典的分词，生成的索引应该比较小吧，但我测试生成的索引文件比较大，我个人感觉好像不是基于词典的（具体程序没有研究）；分词效果好像不是特别好：查全率还可以，准确率不高！</description>
		<content:encoded><![CDATA[<p>你的lucene中文分词有三个包，cn，cw，cjk，按照你说的你的cw实现了基于词典的分词，生成的索引应该比较小吧，但我测试生成的索引文件比较大，我个人感觉好像不是基于词典的（具体程序没有研究）；分词效果好像不是特别好：查全率还可以，准确率不高！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小影</title>
		<link>http://www.reality.hk/articles/2005/03/16/382/comment-page-1/#comment-3334</link>
		<dc:creator>小影</dc:creator>
		<pubDate>Fri, 29 Jul 2005 16:55:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.siuying.net/articles/2005/03/10/382/#comment-3334</guid>
		<description>那是外面的連結，不在我的控制範圍。不過內容是沒問題的，只需要手動將編碼設為GB就可以了</description>
		<content:encoded><![CDATA[<p>那是外面的連結，不在我的控制範圍。不過內容是沒問題的，只需要手動將編碼設為GB就可以了</p>
]]></content:encoded>
	</item>
</channel>
</rss>
