Online Spell Checker…

This can be viewed online on my Social Search site try searching for Yahoi Search.
It is a good thing have a spell checker facility in a Search Engine, people are not always correct with their spelling and yeah sometimes typos do occur. I read somewhere about using a statistical model to develop a spell checker, and, I was amazed. But I had neither the time or the brain to implement/optimize it,so I went for the easier option, I used yahho spell checker api available here.The code I came up with (with some help from my previous work and also a few other work available on the internet) is presented here:

$req_spcheck=’’; ///create the query here, output is serialized PHP
$res = file_get_contents($req_spcheck);
$phpobj_spcheck = unserialize($res);
foreach($phpobj_spcheck as $arr2) { ///for each loop to get each of the suggestions
$checked.='<a href=”’.trim(urlencode($arr2[‘Result’])).’&submit=&co=all”>’.($arr2[‘Result’]).'</a>’; ///create a link that can be used also as a search query on my site
if ($str4!=””){ //making sure we r getting a corrected result
echo “<div style=’font-size:1.2em;background-color:#FFFFCC;border-top:1px solid gold;border-bottom:2px solid gold;text-align:left’><img src=’images/spellcheck.png’ style=’padding-right:2px’ alt=’Spellitrite ‘ />Did you mean:”.$checked.”?</div>”; ///display the spell suggestions

This can be viewed online on my Social Search site try searching for Yahoi Search.

Totally Cool.
P.S. Should have known that, to display code in wordress, should have used htmlentities.Thanks. updates.

My Social Search Engine:SansJ has had some updates to it’s interface recently. Most notable is the use of CSS based Buttons instead of standard HTML buttons. Thanks to some excellent free web 2.0-ish icons available here, I have been able to create some good-looking CSS buttons.The new menubar at the top has been created with help from here; which is a wonderful site to learn about HTML <li> and also look at some implementations (mainly CSS based menus).

I wa surprised to find that IE does not support :hover for anything other than <a> and was happy to use the workaround available here.

Another weird problem that I encountered with IE (versions 6 & 7).IE doesn’t seem to display text that had the color defined as ‘grey’, but, when I used the HEX value for color grey the text actually was visible. It is a bit difficult for me to put up with these issues as at home (where I mostly code), I use a mac and do not have IE (running windows a Guest OS, is something I wouldn’t want to do again), so I discover these quirks with IE when I get to work and then try to FTP to my site and try to edit files, and is getting quite painful as I am usually busy at work.

More updates, soon.I am hoping to complete some ideas that I would want to implement before I leave to NZ for a 4 day vacation.In preparation to the trip (apart from the shopping), I have decided to get rid of the tummy that could get out of control and found some help here.