Zend Certified Engineer

phpguru.org

Quality PHP and Javascript code
Download RGraph: HTML5 canvas graph library... Home ~ Downloads ~ FAQs ~ Licensing
RSS Feed RSS Feed
Follow me on Twitter Follow me on Twitter

Add to Google...

HTML5 & CSS3

Articles

Javascript

PHP5

PHP4






Bookmark with delicious tweet this site Post to Google Buzz! Stumble! this site

Porter Stemmer

A PHP5 only class to faciliate the stemming of word. This is the process of removing suffixs from words to produce their "stems", eg national -> nation, running -> run, adoption -> adopt. This class, as the name might suggest, implements the algorithm by Martin Porter.

Usage

The public API is very simple, consisting of one function. The function takes two arguments, one being the word you wish to stem, and the optional second being whether to use the built in cache or not. Only use the cache if you know you might be stemming the same word multiple times.

<?php
    $stem 
PorterStemmer::Stem("nationalize");
?>

A difference from the published code, is that this version also removes English suffixes, eg "ise" as well as "ize".

Download



RGraph: HTML5 canvas graph library

Example graph made using RGraph

If you're interested in web development, then you may also be interested in RGraph: HTML5 canvas graph library. It uses HTML5 features to produce a wide variety of graph types. Because it moves the creation of graphs from the server to the client, it can significantly reduce the load on your server and your bandwidth usage.