Thanks Robert. Yes thats right I can get some more accuracy if I use transposition in addition to substitution, insert and deletion. ________________________________________ From: Robert Muir [rcm...@gmail.com] Sent: Thursday, March 01, 2012 9:50 PM To: solr-user@lucene.apache.org Subject: Re: Spelling Corrector Algorithm
On Thu, Mar 1, 2012 at 6:43 AM, Husain, Yavar <yhus...@firstam.com> wrote: > Hi > > For spell checking component I set extendedResults to get the frequencies and > then select the word with the best frequency. I understand the spell check > algorithm based on Edit Distance. For an example: > > Query to Solr: Marien > > Spell Check Text Returned: Marine (Freq: 120), Market (Freq: 900) and others. > My dictionary here is based on indexed words. > > So I chose Market (more frequency) however which is wrong as my intent was > marine. Both have Edit Distance of 2. If you don't mind using trunk, just use directspellchecker, since it counts marine as an edit distance of 1 from marien (a transposition: https://issues.apache.org/jira/browse/LUCENE-3662) -- lucidimagination.com ****************************************************************************************** This message may contain confidential or proprietary information intended only for the use of the addressee(s) named above or may contain information that is legally privileged. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message and any copies immediately thereafter. Thank you.- ****************************************************************************************** FAFLD