Implementation of porters stemming algo in c++