InterpretedChunksDecoder4Generator.hpp
1.31 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 std::string& orthPrefix,
const std::string& lemma,
const InterpretedChunk& chunk,
const unsigned char*& ptr) const;
void decodeForm(
const std::vector<uint32_t>& lemma,
const EncodedForm& orth,
std::string& res) const;
EncodedInterpretation deserializeInterp(const unsigned char*& ptr) const;
mutable std::vector<uint32_t> codepoints;
};
#endif /* INTERPRETEDCHUNKSDECODER4GENERATOR_HPP */