Re: Applying SpellChecker to a phrase

2007-12-11 Thread smokey
Thanks for pointing me to the right class to use. On Dec 11, 2007 3:23 AM, Doron Cohen <[EMAIL PROTECTED]> wrote: > Yes that's right, my mistake. > > In fact even after reading your comment I was puzzled > because PhraseScorer indeed requires *all* phrase-positions > to be satisfied in order to m

Re: Applying SpellChecker to a phrase

2007-12-11 Thread Doron Cohen
Yes that's right, my mistake. In fact even after reading your comment I was puzzled because PhraseScorer indeed requires *all* phrase-positions to be satisfied in order to match. The answer is that the OR logic is taken care of by MultipleTermPositions, so the scorer does not need to be aware of a

Re: Applying SpellChecker to a phrase

2007-12-10 Thread Chris Hostetter
Isn't MultiPhraseQuery what is desired here? you can add Term[]s per position and at least one term in each array must much. : > I was thinking of parsing the phrase query string into a : > sequence of terms, : > then constructing a phrase query object using add(Term term, : > int position) : >

Re: Applying SpellChecker to a phrase

2007-12-08 Thread Karl Wettin
You might want to take a look at the TokenPhraseSuggester in LUCENE-626. It is more or less a FuzzySpanQuery, built from a matrix of tokens, but places one search for each possible query out of the matrix (with some optional parameters to minimze the query) to find a score and the hits for

Re: Applying SpellChecker to a phrase

2007-12-07 Thread Doron Cohen
smokey <[EMAIL PROTECTED]> wrote on 04/12/2007 16:54:32: > Thanks for the information on o.a.l.search.spans. > > I was thinking of parsing the phrase query string into a > sequence of terms, > then constructing a phrase query object using add(Term term, > int position) > method in org.apache.lucen

Re: Applying SpellChecker to a phrase

2007-12-04 Thread smokey
Thanks for the information on o.a.l.search.spans. I was thinking of parsing the phrase query string into a sequence of terms, then constructing a phrase query object using add(Term term, int position) method in org.apache.lucene.search.PhraseQuery class. Then I can inject similar words (suggested

Re: Applying SpellChecker to a phrase

2007-12-03 Thread Doron Cohen
See below - smokey <[EMAIL PROTECTED]> wrote on 03/12/2007 05:14:23: > Suppose I have an index containing the terms impostor, > imposter, fraud, and > fruad, then presumably regardless of whether I spell impostor and fraud > correctly, Lucene SpellChecker will offer the improperly > spelled versi

Re: Applying SpellChecker to a phrase

2007-12-03 Thread smokey
I have not tried this yet. I am trying to understand the best practices from others who have experiences with SpellChecker before actually implementing it. If I understand it correctly, the spell check class suggests alternate but similar words for a single input term. So I believe I will have to

Re: Applying SpellChecker to a phrase

2007-12-03 Thread Erick Erickson
Have you actually tried this and done a query.toString() to see how this is actually expanded? Not that I'm all that familiar with SpellChecker, but before presuming how things work you would get answers faster if you ran a test. And, why do you care about performance? I know that's a silly qu