Add a custom search engine to your site using PHP and MySQL

Search is an integral of all websites. Most of the current WordPress an other sites use a built-in search capability or rely on Google custom search. However, many a times you will want to add your own search engine which you can yourself control. This can be particularity useful if you have a small intranet. In this post we will see how to integrate a small PHP search engine into any website to add custom search capabilities.
(more…)

Read More

WolframAlpha – Dawn of a new search era

Today will be the launch of WolframAlpha, the new knowledge engine everyone is waiting for. WolframAlpha will truly revolutionize information search in that the information returned will be computed for your particular purpose from a gargantuan knowledge base. It rightly shows the power of intelligent computing. Even though I’m a developer myself and regularly keep myself abreast in the software field, I couldn’t have imagined the amount of advances made in natural language processing, heuristics and knowledge representation.
(more…)

Read More

Search & replace in files using php

Searching and replacing content in files is a common task all of us do regularly. Most programmers will implement it using Perl a shell script or through a editor. Perl offers itself as an excellent tool for the required purpose; we PHP programmers are not quite so lucky in that matter. Search/replace is easier from a shell prompt or an editor, but what if you have to do the same programatically in php. File_SearchReplace is a pear package that helps you search/replace in files through a nice object oriented interface.
(more…)

Read More

Porter Stemming algorithm for search

In this post we will see how to use a Stemming algorithm for search purposes.

A stemming algorithm lets you reduce each English input word to its basic root or stem (e.g. ‘walking’ to ‘walk’) so that variations on a word (‘walks’, ‘walked’, ‘walking’) are considered equivalent when searching. This stems can than be used in a search query rather than the original words, which generally (but not always) results in more relevant search results. The main use of stemming is in keyword indexing for search. For example if you have a article or document titled ‘blogging tips for late workers‘ and you run it through the algorithm you will get a list of stems for the title – blog, tip, late, worker; under which you can than index the article or document.
(more…)

Read More