-
Notifications
You must be signed in to change notification settings - Fork 0
/
type.h
166 lines (128 loc) · 3.13 KB
/
type.h
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#ifndef TYPE_H
#define TYPE_H
#pragma warning(disable : 4786)
#include <iostream>
#include <set>
#include <string>
#include <map>
#include <list>
#include <vector>
using std::set;
using std::string;
using std::map;
using std::pair;
using std::list;
using std::vector;
using std::cerr;
using std::cout;
using std::endl;
using std::make_pair;
using std::ostream;
using std::boolalpha;
#include <iostream>
#include <fstream>
#include <string>
#include <set>
#include <list>
#include <map>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <sstream>
using std::ifstream;
using std::string;
using std::setw;
using std::set;
using std::list;
using std::map;
using std::multimap;
using std::cin;
using std::cerr;
using std::cout;
using std::endl;
using std::getline;
//using std::pair;
//using std::make_pair;
using std::ostream;
using std::stringstream;
struct entryCupt;
struct sentence;
struct link;
typedef list<string> listString;
typedef list<entryCupt> listEntryCupt;
typedef list<link> listLink;
typedef vector<sentence> vectorSentence;
typedef vector<string> vectorString;
typedef vector<listEntryCupt> vectorListEntryCupt;
typedef set<int> setInt;
typedef set<string> setString;
typedef map<int,string> mapIntXString;
typedef map<string,int> mapStringXInt;
typedef map<string,string> mapStringXString;
struct link {
string name;
string head;
string dipen;
void inline print(ostream& os)
{
os << name << '\t'
<< head << '\t'
<< dipen << endl;
};
};
struct entryCupt {
string id;
string form;
string lemma;
string upos;
string xpos;
string feats;
string head;
string deprel;
string deps;
string misc;
string named;
bool join;
void inline print(ostream& os)
{
os << id << '\t'
<< form << '\t'
<< lemma << '\t'
<< upos << '\t'
<< xpos << '\t'
<< feats << '\t'
<< head << '\t'
<< deprel << '\t'
<< deps << '\t'
<< misc << '\t'
<< named << endl;
};
};
struct sentence {
string testo;
string source;
listEntryCupt elem;
listLink linkGrp;
void inline clear()
{
elem.clear();
linkGrp.clear();
}
void inline print(ostream& out)
{
out << source << endl;
out << testo << endl;
listEntryCupt::iterator p;
for(p = elem.begin(); p != elem.end(); ++p)
{
p->print(out);
}
listLink::iterator q;
for(q = linkGrp.begin(); q != linkGrp.end(); ++q)
{
q->print(out);
}
out << endl;
};
};
#endif