forked from ZXCroon/Wordable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutil.h
executable file
·51 lines (40 loc) · 1.02 KB
/
util.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
#ifndef UTIL_H
#define UTIL_H
#include <iostream>
#include <string>
using namespace std;
namespace word {
enum PartOfSpeech {
n, // noun
v, // verb
adj, // adjective
adv, // adverb
prep, // preposition
conj, // conjunction
pron, // pronoun
interj, // interjection
num, // numeral
art, // article
npos // cannot recognize
};
typedef enum PartOfSpeech POSP;
string POSPToStr(const POSP& posp);
POSP strToPOSP(const string& str);
}
namespace str {
void clearEnds(string& s, char toDel=' ');
string intToStr(int n);
int strToInt(const string& s);
string readSent(istream& is);
bool isNumber(const string& s);
}
void sendStr(ostream& os, const string& S);
void sendStr(string& s, const string& S);
// Calculate timestamp gap after familarity t
int gap(int t);
const int DIFFI_NUM = 5;
const int LEVEL_MAX = 100;
const int NEED_TIME = 2;
const int INF = 100000000;
const int OPTION_NUM = 4;
#endif