You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Xiaocheng Luan <je...@yahoo.com> on 2006/04/01 00:20:08 UTC
Spellchecker bug (or feature?)
Not sure if this is the right place to report this issue:
The accuracy value, which can be set via setAccuracy(), is being modified in SpellChecker.java when a word is checked. As a result, the "min" may be pushed
very high and will not suggest anything for later requests.
One workaround would be to call setAccuracy() each time before a word is checked, I'm not sure if this is a feature (intended behavior) or a bug.
By the way, I'm using spellchecker 1.9.1 that comes with Lucene 1.9.1.
Thanks,
Xiaocheng
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Spellchecker bug (or feature?)
Posted by karl wettin <ka...@snigel.net>.
1 apr 2006 kl. 03.13 skrev karl wettin:
>
> 1 apr 2006 kl. 00.20 skrev Xiaocheng Luan:
>
>> Not sure if this is the right place to report this issue:
>>
>> The accuracy value, which can be set via setAccuracy(), is being
>> modified in SpellChecker.java when a word is checked. As a result,
>> the "min" may be pushed
>> very high and will not suggest anything for later requests.
>>
>> One workaround would be to call setAccuracy() each time before a
>> word is checked, I'm not sure if this is a feature (intended
>> behavior) or a bug.
>> By the way, I'm using spellchecker 1.9.1 that comes with Lucene
>> 1.9.1.
>
> Ah, excellent timing. I just posted about that on the Jira as a
> side note to my spell check refactor.
>
> http://issues.apache.org/jira/browse/LUCENE-537?page=all
It is most definitely a bug. And here is the quite simple fix:
public Suggestion[] suggestSimilar(String word, int numOfSuggestions....
float min = this.min; // allows manipulation of accuracy
within method.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: Spellchecker bug (or feature?)
Posted by karl wettin <ka...@snigel.net>.
1 apr 2006 kl. 03.13 skrev karl wettin:
>
> 1 apr 2006 kl. 00.20 skrev Xiaocheng Luan:
>
>> Not sure if this is the right place to report this issue:
>>
>> The accuracy value, which can be set via setAccuracy(), is being
>> modified in SpellChecker.java when a word is checked. As a result,
>> the "min" may be pushed
>> very high and will not suggest anything for later requests.
>>
>> One workaround would be to call setAccuracy() each time before a
>> word is checked, I'm not sure if this is a feature (intended
>> behavior) or a bug.
>> By the way, I'm using spellchecker 1.9.1 that comes with Lucene
>> 1.9.1.
>
> Ah, excellent timing. I just posted about that on the Jira as a
> side note to my spell check refactor.
>
> http://issues.apache.org/jira/browse/LUCENE-537?page=all
It is most definitely a bug. And here is the quite simple fix:
public Suggestion[] suggestSimilar(String word, int numOfSuggestions....
float min = this.min; // allows manipulation of accuracy
within method.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Spellchecker bug (or feature?)
Posted by karl wettin <ka...@snigel.net>.
1 apr 2006 kl. 00.20 skrev Xiaocheng Luan:
> Not sure if this is the right place to report this issue:
>
> The accuracy value, which can be set via setAccuracy(), is being
> modified in SpellChecker.java when a word is checked. As a result,
> the "min" may be pushed
> very high and will not suggest anything for later requests.
>
> One workaround would be to call setAccuracy() each time before a
> word is checked, I'm not sure if this is a feature (intended
> behavior) or a bug.
> By the way, I'm using spellchecker 1.9.1 that comes with Lucene
> 1.9.1.
Ah, excellent timing. I just posted about that on the Jira as a side
note to my spell check refactor.
http://issues.apache.org/jira/browse/LUCENE-537?page=all
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org