omorfi 0.9.9
Open morphology of Finnish
omorfi.hh
Go to the documentation of this file.
1
9// This program is free software: you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation, version 3 of the License.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21#ifndef _OMORFI_HH
22#define _OMORFI_HH 1
23
24#ifdef HAVE_CONFIG_H
25# include <config.h>
26#endif
27
28#include <hfst/hfst.h>
29
33namespace omorfi {
34
38 class Omorfi {
39
40 private:
41
42 hfst::HfstTransducer* analyser_;
43 bool can_analyse_;
44
45 hfst::HfstTransducer* openHFST_(const std::string& filename);
46
47 public:
48
51
54
60 void loadAnalyser(const std::string& filename);
61
72 std::vector<std::string> analyse(const std::string& token);
73
83 std::vector<std::string> tokenise(const std::string& text);
84
93 bool accept(const std::string& token);
94
95
96 };
97
98}
99
100#endif // OMORFI_HH
101
Definition: omorfi.hh:38
std::vector< std::string > tokenise(const std::string &text)
void loadAnalyser(const std::string &filename)
std::vector< std::string > analyse(const std::string &token)
bool accept(const std::string &token)
-factorise
Definition: omorfi.cc:39