Author: Alexander Barkov
Email: [email protected]
Message:
Hi,
> Hi there!
>
> We're using mnogosearch on a few german sites and also use the wrdstat feature to display alternative suggestions if the user query failed on a customized search page using the mnogosearch PHP module.
>
> However, the snd value in the wrdstat table seems to be calculated using the common soundex procedure, which is fine for the english language but not so great for other languages, in our case: german.
>
> There ist already a well described alternative for the german language, described here: http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik (sorry, in german) or referenced here: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/language/ColognePhonetic.html
>
> We use a tweaked version of this cologne procedure in some of our proprietary search forms directly on databases, but the question is:
> Can we somehow use this procedure instead of the standard soundex procedure in mnogosearch? Is there any hook or something to manipulate the calculation of the snd column in the wrdstat table (which is the heart of the "did you mean..." magic, as we assume) to use a different approach than soundex? It would be great if there was a chance without having to manipulate the source code of mnogosearch itself, though we fear that this would be the only way to achieve our goal...?
>
> Hopefully I could make myself clear; any answers on that matter would be highly appreciated!
>
> Thanks a lot in advance (and, obiously: keep up your great work on that search engine! It's terrific.)
>
I can see two steps to add this:
1. Add a new low-level function with the set of parameters
similar to the function UdmSoundex(), implemented in unidata.c.
For example:
void UdmSoundexCologne(UDM_CHARSET *cs, char *dst, const char *src, size_t srclen)
2. Add a configuration options (i.e. indexer.conf and search.htm commands) to specify which soundex algorithm to use.
For example:
SuggestAlgorithm soundex
or
SuggestAlgorithm cologne
with "soundex" being default.
Would you like to try implementing N1?
Reply: <http://www.mnogosearch.org/board/message.php?id=21249>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.