forked from HIT-SCIR/ltp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.h
56 lines (45 loc) · 1.53 KB
/
settings.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
#ifndef __LTP_PARSER_SETTINGS_H__
#define __LTP_PARSER_SETTINGS_H__
#include <iostream>
namespace ltp {
namespace parser {
// define constant
const std::string ROOT_FORM = "RT#";
const std::string ROOT_LEMMA = "RT#";
const std::string ROOT_CPOSTAG = "RT#";
const std::string ROOT_POSTAG = "RT#";
const std::string ROOT_FEAT = "RT#";
const std::string ROOT_DEPREL = "RT#";
// weired things.
const std::string PRP = "PRP";
const std::string PRP2 = "PRP2";
const std::string OOV = "-OOV-";
// none const
const std::string NONE_FORM = "##";
const std::string NONE_LEMMA = "##";
const std::string NONE_CPOSTAG = "##";
const std::string NONE_POSTAG = "##";
const std::string NONE_FEAT = "##";
const std::string FSEP = "-";
const double DOUBLE_POS_INF = 1e20;
const double DOUBLE_NEG_INF = -1e20;
const double EPS = 1e-10;
// span type const
const size_t CMP = 0;
const size_t INCMP = 1;
const size_t SIBSP = 2;
enum {
DEPU, // Unlabeled Standard Features
DEPL, // Labeled Standard Features
SIBU, // Unlabeled Sibling Features
SIBL, // Labeled Sibling Features
GRDU, // Unlabeled Grandchild Feature
GRDL, // Labeled Grandchild Feature
GRDSIBU, // Unlabeled Grand Sibling Features
GRDSIBL,
POSU,
POSB,
};
} // end for namespace parser
} // end for namespace ltp
#endif // end for __LTP_PARSER_SETTINGS_H__