Lucene.Net/SpellChecker - Multilingual / Phrase Auto Offer

I implemented Lucenet.NET on my site, using it to index my products, which are theater shows, tours and attractions around London.

I want to implement "Did you mean?" function when users skip product names that take into account all product names, not just single words. For instance,

If the user typed:

Lodnin Eye

I would like to auto-negotiate:

London London Eye

I assume that I do not want the analyzer to index the headers as if they were a single object, so that SpellChecker can come close to a phrase as well as individual words.

How should I do it?

+3
source share
3

autosuggest lucene.net.

, java- lucene shingle contrib, . , lucene.nets contrib , .

lucene, java, lucene.net, . :

lucene.net, .IndexDictionary, " " jake scotts. , , .

java, , , .

i dotnet, , . , , , , , , , lucene.net, .

, .suggests , .

+7

:

SimpleLucene, lucene, .

+10

This is probably not the best solution, and I would definitely use the answer suggested by the astronaut, but here is another possible solution. Use KeywordAnalyzer or KeywordTonenizer for each title, this does not break the title into separate tokens, but saves it as a single token. Using the SuggestSimilar method will return the entire title as a sentence.

0
source

Source: https://habr.com/ru/post/1751771/


All Articles