Greetings all,
I have been testing the fuzzy algorithms, and can't get "speling" to
work, and I don't understand "regex".
"Speling" generates permuted forms of the query term, and check each
to see if it is in the database, like so:
// First transposes
// (these are really common)
initial = stripped;
char temp = initial[pos];
initial[pos] = initial[pos+1];
initial[pos+1] = temp;
if (!wordDB.Exists(initial)) // Seems weird, but this is
correct
words.Add(new String(initial));
// Now let's do deletions
The problem is that, whether or not the permutation is in the
database, wordDB.Exists(...) always seems to return -1 ("true"),
which means that the 'if' always fails (despite the comment saying it
is correct :)
"Regex" has problems with the meta characters being stripped out
before getting to the algorithm. Should the meta characters be part
of "extra_word_characters"? If so, what happens if "regex" and
"exact" are both specified in search_algorithms? When I set
"extra_word_characters=.*[^]\\$", the query ".*vers[ia].*" expands to
all the *numbers* in the word database.
Has anyone got speling or regex to work, or is the person who
wrote either of them still here?
Thanks!
Lachlan
--
[EMAIL PROTECTED]
ht://Dig developer DownUnder (http://www.htdig.org)
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
ht://Dig Developer mailing list:
[EMAIL PROTECTED]
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-dev