News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sameer Borate's Blog:
Porter Stemming algorithm for search
April 29, 2009 @ 07:57:06

In a recent post to his blog Sameer looks at implementing a Stemming algorithm to search an array of words. It uses this library (as written by Richard Heyes).

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.

His code example uses the library to search for two different types of strings - a single word and a phrase (with stop words removed). The Stem() method is called on the word and the results are looped through to remove all matching the values in the stop words array.

0 comments voice your opinion now!
stop word search stem root query library richardheyes


blog comments powered by Disqus

Similar Posts

Make Me Pulse Blog: Tips : RecursiveArrayIterator on mulitdimensional Array

Joshua Eichorn's Blog: Adding AJAX to a Website step by step, Part II

Paul Jones' Blog: Solar 0.21 and 0.22 released in quick succession

Web Builder Zone: Can you use PHP without frameworks nowadays?

DeveloperTutorials.com: PHP Site Search Made Easy


Community Events

Don't see your event here?
Let us know!


podcast install php7 performance example language opinion introduction api symfony2 conference release library application framework interview laravel series configure community

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework