InterpsGroup.hpp
1.03 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
/*
* File: GroupedInterpretations.hpp
* Author: lennyn
*
* Created on November 16, 2013, 7:58 PM
*/
#ifndef GROUPEDINTERPRETATIONS_HPP
#define GROUPEDINTERPRETATIONS_HPP
#include <vector>
#include <string>
#include "EncodedInterpretation.hpp"
#include "MorphInterpretation.hpp"
#include "Tagset.hpp"
class InterpsGroup {
public:
InterpsGroup() {
}
explicit InterpsGroup(const int type)
: type(type) {
}
std::vector<MorphInterpretation> getRealInterps(const std::string& orth, const Tagset& tagset) {
std::vector<MorphInterpretation> res;
for (EncodedInterpretation& ei: interps) {
res.push_back(MorphInterpretation(startNode, endNode, orth, ei, tagset));
}
return res;
}
void addInterpretation(const EncodedInterpretation& interp) {
interps.push_back(interp);
}
int type;
int startNode;
int endNode;
private:
std::vector<EncodedInterpretation> interps;
};
#endif /* GROUPEDINTERPRETATIONS_HPP */