InterpretedChunksDecoder4Generator.hpp
1.29 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
/*
* File: InterpretedChunksDecoder4Generator.hpp
* Author: mlenart
*
* Created on 15 maj 2014, 15:28
*/
#ifndef INTERPRETEDCHUNKSDECODER4GENERATOR_HPP
#define INTERPRETEDCHUNKSDECODER4GENERATOR_HPP
#include "InterpretedChunksDecoder.hpp"
class InterpretedChunksDecoder4Generator : public InterpretedChunksDecoder {
public:
InterpretedChunksDecoder4Generator(const Environment& env);
void decode(
unsigned int startNode,
unsigned int endNode,
const InterpretedChunk& interpretedChunk,
std::vector<MorphInterpretation>& out) const;
private:
void convertPrefixes(const InterpretedChunk& interpretedChunk, std::string& orthPrefix, std::string& lemma) const;
MorphInterpretation decodeMorphInterpretation(
unsigned int startNode, unsigned int endNode,
const string& orthPrefix,
const string& lemma,
const InterpretedChunk& chunk,
const unsigned char*& ptr) const;
void decodeForm(
const vector<uint32_t>& lemma,
const EncodedForm& orth,
string& res) const;
EncodedInterpretation deserializeInterp(const unsigned char*& ptr) const;
mutable std::vector<uint32_t> codepoints;
};
#endif /* INTERPRETEDCHUNKSDECODER4GENERATOR_HPP */