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