fastText  d00d36476b15
Fast text processing tool/library
args.h
Go to the documentation of this file.
1 
10 #ifndef FASTTEXT_ARGS_H
11 #define FASTTEXT_ARGS_H
12 
13 #include <istream>
14 #include <ostream>
15 #include <string>
16 
17 namespace fasttext {
18 
19 enum class model_name : int {cbow=1, sg, sup};
20 enum class loss_name : int {hs=1, ns, softmax};
21 
22 class Args {
23  public:
24  Args();
25  std::string input;
26  std::string test;
27  std::string output;
28  double lr;
30  int dim;
31  int ws;
32  int epoch;
33  int minCount;
35  int neg;
39  int bucket;
40  int minn;
41  int maxn;
42  int thread;
43  double t;
44  std::string label;
45  int verbose;
46  std::string pretrainedVectors;
48 
49  bool qout;
50  bool retrain;
51  bool qnorm;
52  size_t cutoff;
53  size_t dsub;
54 
55  void parseArgs(int, char**);
56  void printHelp();
57  void printBasicHelp();
58  void printDictionaryHelp();
59  void printTrainingHelp();
60  void printQuantizationHelp();
61  void save(std::ostream&);
62  void load(std::istream&);
63 };
64 
65 }
66 
67 #endif
int ws
Definition: args.h:31
int minCount
Definition: args.h:33
std::string input
Definition: args.h:25
size_t cutoff
Definition: args.h:52
std::string label
Definition: args.h:44
std::string test
Definition: args.h:26
std::string pretrainedVectors
Definition: args.h:46
Definition: args.h:22
double lr
Definition: args.h:28
loss_name loss
Definition: args.h:37
int epoch
Definition: args.h:32
Definition: args.cc:17
int maxn
Definition: args.h:41
bool retrain
Definition: args.h:50
int wordNgrams
Definition: args.h:36
int bucket
Definition: args.h:39
double t
Definition: args.h:43
std::string output
Definition: args.h:27
int saveOutput
Definition: args.h:47
int minCountLabel
Definition: args.h:34
loss_name
Definition: args.h:20
int lrUpdateRate
Definition: args.h:29
int thread
Definition: args.h:42
bool qout
Definition: args.h:49
bool qnorm
Definition: args.h:51
model_name model
Definition: args.h:38
int verbose
Definition: args.h:45
int dim
Definition: args.h:30
int neg
Definition: args.h:35
int minn
Definition: args.h:40
size_t dsub
Definition: args.h:53
model_name
Definition: args.h:19