-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgramOptions.h
More file actions
104 lines (69 loc) · 2.07 KB
/
ProgramOptions.h
File metadata and controls
104 lines (69 loc) · 2.07 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
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
/*
* ProgramOptions.h
*
* Created on: Dec 10, 2016
* Author: louis
*/
#ifndef PROGRAMOPTIONS_H_
#define PROGRAMOPTIONS_H_
#include "ValueInterpolationStrategy.h"
#include <string>
#include <vector>
#include "cmdline.h"
namespace SLM {
class ProgramOptions {
public:
ProgramOptions(int argc, char** argv);
virtual ~ProgramOptions();
std::string getTrainDirectory() const;
std::string getTrainModelName() const;
std::string getTrainCorpus() const;
std::string getTrainPatternModel() const;
std::string getTrainVocabulary() const;
std::string getTrainLanguageModel() const;
std::string getTestModelName() const;
std::string getTestInputDirectory() const;
std::string getTestOutputDirectory() const;
std::string getTestCorpus() const;
std::string getTestPatternModel() const;
std::string getTestVocabulary() const;
std::vector<std::string> getTestInputFiles() const;
int getOrder() const;
bool isIgnoreCache() const;
std::string getHostName() const;
std::string getBackoffOptions() const;
double getNpref() const;
SLM::ValueInterpolationWeights& getValues();
bool isDisableProgress() const;
bool addSentenceMarkers() const;
bool isServerMode() const;
private:
cmdline::parser clp;
std::string trainDirectory;
std::string trainModelName;
std::string trainCorpus;
std::string trainPatternModel;
std::string trainVocabulary;
std::string trainLanguageModel;
std::string testModelName;
std::string testInputDirectory;
std::string testInputFilesList;
std::string testOutputDirectory;
std::string testCorpus;
std::string testPatternModel;
std::string testVocabulary;
std::vector<std::string> testInputFiles;
int order = 0;
bool ignoreCache = false;
std::string backoffOptions;
// backoff
std::string hostName;
double npref;
SLM::ValueInterpolationWeights viWeights;
bool disableProgress;
bool sentenceMarkers = false;
bool serverMode = false;
SLM::ValueInterpolationWeights valuesFromString(const std::string& val);
};
} /* namespace SLM */
#endif /* PROGRAMOPTIONS_H_ */