DeSR Dependency Parser |
00001 /* 00002 ** Tanl C++ Library 00003 ** ixe/Tanl/text/Suffixes.h 00004 ** ---------------------------------------------------------------------- 00005 ** Copyright (c) 2002 Giuseppe Attardi (attardi@di.unipi.it). 00006 ** ---------------------------------------------------------------------- 00007 ** 00008 ** This file is part of DeSR. 00009 ** 00010 ** DeSR is free software; you can redistribute it and/or modify it 00011 ** under the terms of the GNU General Public License, version 3, 00012 ** as published by the Free Software Foundation. 00013 ** 00014 ** DeSR is distributed in the hope that it will be useful, 00015 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 ** GNU General Public License for more details. 00018 ** 00019 ** You should have received a copy of the GNU General Public License 00020 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00021 ** ---------------------------------------------------------------------- 00022 */ 00023 00024 #ifndef Tanl_Suffixes_H 00025 #define Tanl_Suffixes_H 00026 00027 #include "text/less.h" 00028 #include <fstream> 00029 #include <string> 00030 #include <vector> 00031 00032 namespace Tanl { 00033 namespace Text { 00034 00038 class Suffixes : public std::vector<const char*> 00039 { 00040 public: 00041 Suffixes() { } 00042 00046 Suffixes(char const* file); 00047 00048 Suffixes(std::string& file); 00049 00050 char const* match(char const* word); 00051 00055 void store(char const* file); 00056 00057 private: 00058 void load(std::ifstream& ifs); 00059 }; 00060 00061 } // Text 00062 } // Tanl 00063 00064 #endif // Tanl_Suffixes_H