00001 /*========================================================================== 00002 * Copyright (c) 2002 University of Massachusetts. All Rights Reserved. 00003 * 00004 * Use of the Lemur Toolkit for Language Modeling and Information Retrieval 00005 * is subject to the terms of the software license set forth in the LICENSE 00006 * file included with this software, and also available at 00007 * http://www.lemurproject.org/license.html 00008 * 00009 *========================================================================== 00010 */ 00011 00012 #ifndef _ARABICSTEMMER_HPP 00013 #define _ARABICSTEMMER_HPP 00014 #include "Stemmer.hpp" 00015 #include "Param.hpp" 00016 #include "Arabic_Stemmer.hpp" 00018 namespace ArabicStemmerParameter { 00020 00021 00022 static lemur::utility::String stemFunc; 00024 00025 static lemur::utility::String defaultStemFunc("arabic_light10_stop"); 00027 static void get() 00028 { 00029 stemFunc = lemur::api::ParamGetString("arabicStemFunc", defaultStemFunc); 00030 } 00031 } 00032 namespace lemur 00033 { 00034 namespace parse 00035 { 00036 00040 class ArabicStemmer : public lemur::api::Stemmer { 00041 public: 00042 static const string identifier; 00043 std::string stemfunc; 00044 ArabicStemmer(const string &stemFunc=ArabicStemmerParameter::defaultStemFunc); 00045 ~ArabicStemmer(); 00047 char * stemWord(char * word); 00048 void writePropertyList(PropertyList* list) const; 00049 private: 00050 Arabic_Stemmer *stemmer; 00051 // may be returned by stemWord. 00052 // magic number for size. 00053 char stem[100]; 00054 }; 00055 } 00056 } 00057 00058 #endif