forked from HIT-SCIR/ltp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlgdpj.cpp
38 lines (32 loc) · 785 Bytes
/
lgdpj.cpp
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
/*
* Graph Based Parser
*
* Author: LI, Zhenghua
* Author: LIU, Yijia
*/
#include <iostream>
#include "cfgparser.hpp"
#include "logging.hpp"
#include "parser.h"
using namespace ltp::parser;
void usage(void) {
std::cerr << "lgdpj - Training and testing suite for Chinese Dependency Parsering" << std::endl;
std::cerr << "Copyright (C) 2012-2013 HIT-SCIR" << std::endl;
std::cerr << std::endl;
std::cerr << "Usage: $./lgdpj <config_file>" << std::endl;
std::cerr << std::endl;
}
int main(int argc, char ** argv) {
if (argc < 2) {
usage();
return -1;
}
ConfigParser cfg(argv[1]);
if (!cfg) {
ERROR_LOG("Failed to parse config file.")
return -1;
}
Parser parser(cfg);
parser.run();
return 0;
}