Environment.hpp
1.91 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* File: Environment.hpp
* Author: mlenart
*
* Created on 22 styczeń 2014, 12:08
*/
#ifndef ENVIRONMENT_HPP
#define ENVIRONMENT_HPP
#include <vector>
class InterpretedChunksDecoder;
#include "charset/CaseConverter.hpp"
#include "charset/CharsetConverter.hpp"
#include "fsa/fsa.hpp"
#include "segrules/segrules.hpp"
#include "const.hpp"
#include "Tagset.hpp"
//#include "InterpretedChunksDecoder.hpp"
#include "InterpsGroup.hpp"
typedef FSA< std::vector<InterpsGroup > > FSAType;
class Environment {
public:
Environment(
MorfeuszCharset charset,
MorfeuszProcessorType morfeuszProcessor,
const unsigned char* fileStartPtr);
void setCharset(MorfeuszCharset charset);
const CharsetConverter& getCharsetConverter() const;
const CaseConverter& getCaseConverter() const;
void setTagset(const Tagset& tagset);
const Tagset& getTagset() const;
void setFSAFile(const std::string& filename);
const SegrulesFSA& getCurrentSegrulesFSA() const;
const FSAType& getFSA() const;
const InterpretedChunksDecoder& getInterpretedChunksDecoder() const;
virtual ~Environment();
private:
const CharsetConverter* currentCharsetConverter;
const UTF8CharsetConverter utf8CharsetConverter;
const ISO8859_2_CharsetConverter isoCharsetConverter;
const Windows_1250_CharsetConverter cp1250CharsetConverter;
const CP852_CharsetConverter cp852CharsetConverter;
const CaseConverter caseConverter;
Tagset tagset;
const unsigned char* fsaFileStartPtr;
const FSAType* fsa;
std::map<SegrulesOptions, SegrulesFSA*> segrulesFSAsMap;
const SegrulesFSA* currSegrulesFSA;
bool isFromFile;
const InterpretedChunksDecoder* chunksDecoder;
MorfeuszProcessorType processorType;
const CharsetConverter* getCharsetConverter(MorfeuszCharset charset) const;
};
#endif /* ENVIRONMENT_HPP */