[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: spelling error configuration
At 10:37 AM 4/14/00 -0600, you wrote:
>There seems to be some annoying behaviour with the search engine when you
select spelling errors - for example, the query of 'beleived in' with 2
matches should find all references with 'believed in', however because the
query contains a word with <= the number of possible spelling errors,
nothing is returned at all. A search for just 'beleived' with 2 matches
works fine and finds the expected entries (plus, of course, several
others). It really should gracefully fall through small words without
trying to find spelling errors in them and allow spelling errors elsewhere
to be corrected rather than blowing up the query.
>
Hi William
You're quite right, this behavior should be as you suggest. The problem
seems to be in the checksg.c routing checksg(). The problem is that this
routine is called on each pattern separately, and it doesn't distinguish
between different types of errors. I didn't go through the debugger but I
think it is failing in the routine asplit_terminal() in agrep.c.
It seems to me that the solution would have to be a bit involved, and would
mean making checksg() return different codes for different errors,
asplit_terminal() would have to recognize types of errors that are only bad
if they affect each part of the pattern, and then decide at the end of the
whole pattern whether to accept it or not.
If anyone has a different take on this I'd be happy to hear it...
--Golda
------------------------------------------------------------
Golda Velez gvelez@iwhome.com 520-620-6878
Internet Workshop http://iwhome.com
Webglimpse Search Software http://webglimpse.net
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Help organize the world - index your own corner of the web