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. |