/* Copyright (C) 2008-2013 Børre Gaup This file is part of the program wordlist2hunspell. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef STRINGPARSER_H #define STRINGPARSER_H #include #include #include class StringParser { public: StringParser(std::string inString); void parseString(std::string inString); std::string getStem() const; std::string getSuffix() const; std::string getPlxPart() const; // std::set< std::string > getSuffixes() const; private: void setStem(std::string inString); void setSuffix(std::string inString); void setPlxPart(std::string inString); std::string cleanCruft(std::string dirty); std::string rinse(std::string inString); std::string _stem; std::string _suffix; std::string _plxPart; std::string::size_type _firstDivisionMark; std::string::size_type _tab; }; #endif // STRINGPARSER_H