The Lucene. Net. Analysis. Cn Bug in the Lucene. Net Language Processing Package

Source: Internet
Author: User
Recently, I have improved the search program in the blog garden. The search function of the blog Park uses the mongoe.net search engine. When the search function was added to the blog Park, mongoe.net did not support Chinese word segmentation. Later, I got help from http://www.cnblogs.com/yuhen/to answer this question. (A problem has occurred in the search program of the blog site recently. google is used for the moment ).

Currently, word segmentation is supported in Alibaba e.net. I downloaded the Language Processing Package ( Lucene. Net NLS PackUsing Lucene. Net. Analysis. Cn. ChineseAnalyzer to create an index, but every time an index is created, a deadlock occurs. After reading this article on sf.net, CJK Analysis maybe cause dead lock, I think it may be Lucene. net. analysis. the code in Cn has a Bug. Check Lucene. net. analysis. the code in Cn really has a problem. In line 148th of ChineseTokenizer, change dataLen =-1 to dataLen = 0, and the deadlock problem is solved. Later, I found this article. I changed the two bugs and put them on the blog garden to download to the publisher. Although only two lines of code have been modified, I want to put it here, which is helpful for some first-time users.
Bin: http://files.cnblogs.com/dudu/Lucene.Net.Analysis.Cn.rar
Src: http://files.cnblogs.com/dudu/Lucene.Net.NLS.rar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.