00001 /*========================================================================== 00002 * 00003 * Original source copyright (c) 2001, Carnegie Mellon University. 00004 * See copyright.cmu for details. 00005 * Modifications copyright (c) 2002, University of Massachusetts. 00006 * See copyright.umass for details. 00007 * 00008 *========================================================================== 00009 */ 00010 00011 #include "TextHandler.hpp" 00012 00013 #ifndef _STEMMER_HPP 00014 #define _STEMMER_HPP 00015 00016 00021 00022 class Stemmer : public TextHandler { 00023 00024 public: 00025 static const string category; 00026 static const string identifier; 00027 00028 Stemmer() { cat=category; iden=identifier;} 00029 00030 virtual char * handleWord(char * word) { 00031 if (word != NULL) { 00032 return stemWord(word); 00033 } 00034 return word; 00035 } 00038 virtual char *stemWord(char * word) = 0; 00039 00040 }; 00041 00042 #endif