Morfeusz.cpp
1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <string>
#include "morfeusz2.h"
#include "MorfeuszImpl.hpp"
namespace morfeusz {
using namespace std;
string Morfeusz::getVersion() {
return string(MORFEUSZ2_VERSION);
}
string Morfeusz::getDefaultDictName() {
return string(MORFEUSZ_DEFAULT_DICT_NAME);
}
Morfeusz* Morfeusz::createInstance(MorfeuszUsage usage) {
return new MorfeuszImpl(Morfeusz::getDefaultDictName(), usage);
}
Morfeusz* Morfeusz::createInstance(const std::string& dictName, MorfeuszUsage usage) {
return new MorfeuszImpl(dictName, usage);
}
Morfeusz::~Morfeusz() {
}
static list<string> initializeDictionarySearchPaths() {
list<string> res;
#ifdef MORFEUSZ_DICTIONARY_SEARCH_PATH1
res.push_back(MORFEUSZ_DICTIONARY_SEARCH_PATH1);
#endif
#ifdef MORFEUSZ_DICTIONARY_SEARCH_PATH2
res.push_back(MORFEUSZ_DICTIONARY_SEARCH_PATH2);
#endif
#ifdef MORFEUSZ_DICTIONARY_SEARCH_PATH3
res.push_back(MORFEUSZ_DICTIONARY_SEARCH_PATH3);
#endif
return res;
}
list<string> Morfeusz::dictionarySearchPaths(initializeDictionarySearchPaths());
}