My Assistant
Support the project and participate in the Community Sponsorship program!
** SERVER MAINTENANCE ** This forum has successfully migrated to a new server. There may be access problems during the weekend while the DNS records are being updated.
![]() ![]() |
Oct 30 2003, 02:38 PM
Post
#1
|
|
The Melty Man![]() Group: Community Member Posts: 244 Joined: 23-August 03 From: The Netherlands Member No.: 13,424 |
Well my site is open for public for a couple of days now and I'm getting a nice stream of visitors through some advertisement. I have installed the Search Contribution and I would just like to recommend it to everyone: it is absolutely vital!
Looking through the first 30 search terms, the number of spelling mistakes is absolutely amazing... no wonder some people never find what they want, you are not likely to get the right results if you search for "Collin Mcray" if you mean "Colin McRae"! Thanks to the Search Contribution you can catch these foolish typing errors and present the visitor with "Did you mean... Colin McRae?" instead of "nothing found, you dumbarse". Thought I'd share this with you p.s. check your keywords several times a day! Correct typing errors or alternative methods of writing the same word. -------------------- "Always the same with men, isn’t it? Looks like a starter handle, works like an off-switch."
- Coupling (BBC Comedy) |
|
|
|
Oct 30 2003, 04:47 PM
Post
#2
|
|
|
_plebeian Group: Community Member Posts: 73 Joined: 14-August 03 From: UK Member No.: 12,946 |
Link to this contrib. please?
|
|
|
|
Oct 30 2003, 11:33 PM
Post
#3
|
|
|
Rodney Group: Community Member Posts: 731 Joined: 13-April 03 Member No.: 7,464 |
I have to agree that this is a most excellent contribution. It's pretty easy to install and works pretty well!
|
|
|
|
Oct 31 2003, 10:37 AM
Post
#4
|
|
The Melty Man![]() Group: Community Member Posts: 244 Joined: 23-August 03 From: The Netherlands Member No.: 13,424 |
Here it is Search Enhancements
This is just really bizarre... with over 70 keywords about 80% are typed wrong... do you also get the impression sometimes that the entire planet is populated by fools hehehe -------------------- "Always the same with men, isn’t it? Looks like a starter handle, works like an off-switch."
- Coupling (BBC Comedy) |
|
|
|
Nov 14 2003, 11:27 PM
Post
#5
|
|
|
mike quinn Group: Community Member Posts: 726 Joined: 8-October 03 From: Edinburgh, Scotland Member No.: 16,479 |
You could always try using the soundex function of mysql
http://www.mysql.com/doc/en/String_functions.html SELECT SOUNDEX('Hello'); -> 'H400' so in a product search you could have something like SELECT pd.products_name FROM products_description pd WHERE SOUNDEX(pd.products_name) = SOUNDEX($UserEnteredCriteria); ---- SELECT SOUNDEX('Colin McRae'); ->C4526 SELECT SOUNDEX('Collin Mcray'); ->C4526 so in terms of soundex both of these "sound" the same and would be found regardless of spelling as long as it sounds correct oh and don't be too harsh on your customers, I bet you guys never make any spelling mistakes when searching for stuff on google -------------------- "All animals are equal, but some animals are more equal than others" - George Orwell
|
|
|
|
Nov 15 2003, 11:49 AM
Post
#6
|
|
The Melty Man![]() Group: Community Member Posts: 244 Joined: 23-August 03 From: The Netherlands Member No.: 13,424 |
I had no idea this was possible... in fact I have no idea how the soundex thing works, surely the computer doesn't know what stuff sounds... nor can it access a huge database where everything is stored. I don't know how it works, but it sounds very interesting indeed.
So much stuff I haven't heard of before Regards, Willem. p.s. to answer your question... no, I don't make mistakes in the products I'm looking for honestly. Perhaps you might type "fifa 2004" instead of "Fifa Football 2004" but that's hardly a typo... When people start typing 'games' on a gameshop website, then I'm starting to get worried actually hehehe -------------------- "Always the same with men, isn’t it? Looks like a starter handle, works like an off-switch."
- Coupling (BBC Comedy) |
|
|
|
Nov 15 2003, 01:21 PM
Post
#7
|
|||
|
Paul Math Group: Validating Posts: 684 Joined: 17-July 03 From: Netherlands Member No.: 11,530 |
Good tip. A pitty for me that this function is optimized for the English language only. I have created a php function like soundex for Dutch, very simple, using lots of string replacements. I haven't tried to implement it in osC though. I am not a good programmer, so it is all very time consuming.
To create a language independand (spelling ok? But don't ask me how! I only know should not be to difficult for a smart programmer. This post has been edited by paulm2003: Nov 15 2003, 01:23 PM |
||
|
|
|||
Nov 15 2003, 07:14 PM
Post
#8
|
|
The Melty Man![]() Group: Community Member Posts: 244 Joined: 23-August 03 From: The Netherlands Member No.: 13,424 |
The lebensthein thing I can't even understand from reading the manual
Anyway, the search engine could use a lot of work, besides the search enhancement is merely a start, not a finished job. With my customised website I have made it possible to actually correct several typos in one searchstring and take the user directly to the results he wants (so Collin Mcray gets you to search results with Colin McRae Rally 4, and so does colin mcrea). This is based on common sense (search replacements), not soundex. Unfortunately it's not the neatest coding and highly focussed on my custom website... if I get some time I might try my hands at a contribution. This post has been edited by WillemB: Nov 15 2003, 07:14 PM -------------------- "Always the same with men, isn’t it? Looks like a starter handle, works like an off-switch."
- Coupling (BBC Comedy) |
|
|
|
Nov 16 2003, 01:30 PM
Post
#9
|
|||
|
mike quinn Group: Community Member Posts: 726 Joined: 8-October 03 From: Edinburgh, Scotland Member No.: 16,479 |
Soundex codes are based upon sounds. Names having similar pronunciations are ideally assigned the same code, a series of four characters. The first character is the initial letter used in the search, in the case of Colin McRae that would be a C. The last three characters are numbers based upon the other letters of the search after removing vowels. The three numbers are coded according to the following relation: 1= B, P, F, V 2= C, S, K, G, J, Q, X, Z 3= D, T 4= L 5= M, N 6= R H,Y and W are ignored and double letters are treated as a single. So if you take Colin McRae this turns into CLMCR, then changing the last characters you get C4526. Generally soundex codes should only be 1 letter and 3 numbers so you should really truncate that returned by mysql to be C452. But anyway that is how it works, no large lists of codes stored etc. And to be honest I don't always know how to spell Colin McRae and I'm Scottish, it could easily have 2 l's or McRae could be spelt MacRae. Using soundex it doesn't matter because they all "sound" the same. This post has been edited by mikeq: Nov 16 2003, 01:34 PM -------------------- "All animals are equal, but some animals are more equal than others" - George Orwell
|
||
|
|
|||
Nov 16 2003, 01:35 PM
Post
#10
|
|
|
OSSHOP Group: Community Member Posts: 35 Joined: 20-August 03 Member No.: 13,211 |
From what I understand metaphone functions are similar to soundex but more reliable. Soundex was created to prevent misspellings in Names for genealogical records where metaphone takes an entire language into consideration.
Both PHP and MySQL support Metaphone as well as Soundex functions. |
|
|
|
Nov 16 2003, 02:10 PM
Post
#11
|
|||
|
Paul Math Group: Validating Posts: 684 Joined: 17-July 03 From: Netherlands Member No.: 11,530 |
But remember: the results are not the same for PHP and MySQL (not sure if that's true for both soundex and metaphone but at least for one of those).
If you want to try a metaphone alike function live, take a look at http://www.eeweb.nl/memory/pn/ I never really got to finish the site but it does work. The English version is best, but also Dutch and Norwegian (a little) is supported PaulM P.S. I made this function for a total different purpuse, it has to do with remembering numbers. If know how to translate numbers to words (actually to sounds and with the sounds you create words), you will be able to remember numbers much better. |
||
|
|
|||
Nov 25 2003, 02:32 AM
Post
#12
|
|
|
Asif Mohammed Group: Community Member Posts: 4 Joined: 24-November 03 Member No.: 20,217 |
So which file and where in that file would I add the soundex function?
Thanks in advance. |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 13th May 2007 - 07:10 AM |
Trademark Policy | Copyright Policy | Sitemap
Copyright © 2000-2007 osCommerce. All rights reserved.
Webmaster: Harald Ponce de Leon (Impressum)