Write an application about Lucene. NET and re-assemble the snowball (2)

Source: Internet
Author: User

Author: finallyliuyu

(1) We have explained the task requirements. (2) We will focus on how to use Lucene. NET and some other open-source tools to implement the above functions.

First of all, I would like to thank a person for his wisdom to cover up the truth. This person wrote a series of entry-level properties for the internal mechanism of lucene.net.ArticleIn a short time, I learned some of the essentials of e.net.

Here, I will insert a sentence to my own scientific research staff and professionalProgramThe difference in the work focus of a programmer: A professional programmer should be familiar with a certain programming product, and hisCodeThe layout should also be said to be excellent, just like the text of a big writer. Researchers focus on ideas andAlgorithmBut the implementation of algorithms and ideas must rely on programs and projects ". At this time, what we need is to quickly build a system and implement our own ideas and algorithms when we know a software or there are not many open-source components. All of us need to humbly ask professionals who have experience in engineering projects"

The following describes how to use open-source tools to assemble and complete (1) requirements like listing recipes.

The open-source tool snowball (which includes javase.net DLL) Porter Stemmer C # code and part-of-speech tagging tool.

Core Idea: modify it in snowballanalyzer. CS.

The reason is as follows: the parent class of Lucene's analyzer class is tokenizer or tokenstream (which cannot be remembered here), and the analyzer class is the pioneer of the indexwrtier class, every time indexwriter is called to write the results to the Lucene built-in "Database", an analyzer must be called first. so we modify the code in the analyzer class.

Another problem is that the snowball has the function of restoring the root. It is implemented by calling the snowballfilter class in the snowballanalyzer class. In the snowballfilter class, you can find related statements that call Stemmer.

But now we need to perform part-of-speech tagging. Obviously, we should first perform part-of-speech tagging before we can perform root-word restoration. Therefore, snowballanalyzer no longer calls snowballfilter to restore the root. We implement all the functions in snowballanalyzer.

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.