fastText: /data/users/cpuhrsch/fbsource/fbcode/deeplearning/fastText/src/args.h Source File

| 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;
29 int lrUpdateRate;
30 int dim;
31 int ws;
32 int epoch;
33 int minCount;
34 int minCountLabel;
35 int neg;
36 int wordNgrams;
37 loss_name loss;
38 model_name model;
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;
47 int saveOutput;
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
fasttext::Args::ws
int ws
Definition: args.h:31
fasttext::model_name::sg
fasttext::Args::minCount
int minCount
Definition: args.h:33
fasttext::Args::input
std::string input
Definition: args.h:25
fasttext::Args::cutoff
size_t cutoff
Definition: args.h:52
fasttext::Args::label
std::string label
Definition: args.h:44
fasttext::Args::test
std::string test
Definition: args.h:26
fasttext::Args::pretrainedVectors
std::string pretrainedVectors
Definition: args.h:46
fasttext::Args
Definition: args.h:22
fasttext::Args::lr
double lr
Definition: args.h:28
fasttext::Args::loss
loss_name loss
Definition: args.h:37
fasttext::Args::epoch
int epoch
Definition: args.h:32
fasttext::model_name::sup
fasttext
Definition: args.cc:17
fasttext::loss_name::softmax
fasttext::Args::maxn
int maxn
Definition: args.h:41
fasttext::Args::retrain
bool retrain
Definition: args.h:50
fasttext::Args::wordNgrams
int wordNgrams
Definition: args.h:36
fasttext::Args::bucket
int bucket
Definition: args.h:39
fasttext::Args::t
double t
Definition: args.h:43
fasttext::Args::output
std::string output
Definition: args.h:27
fasttext::Args::saveOutput
int saveOutput
Definition: args.h:47
fasttext::Args::minCountLabel
int minCountLabel
Definition: args.h:34
fasttext::loss_name
loss_name
Definition: args.h:20
fasttext::Args::lrUpdateRate
int lrUpdateRate
Definition: args.h:29
fasttext::model_name::cbow
fasttext::Args::thread
int thread
Definition: args.h:42
fasttext::Args::qout
bool qout
Definition: args.h:49
fasttext::Args::qnorm
bool qnorm
Definition: args.h:51
fasttext::Args::model
model_name model
Definition: args.h:38
fasttext::Args::verbose
int verbose
Definition: args.h:45
fasttext::Args::dim
int dim
Definition: args.h:30
fasttext::loss_name::ns
fasttext::Args::neg
int neg
Definition: args.h:35
fasttext::loss_name::hs
fasttext::Args::minn
int minn
Definition: args.h:40
fasttext::Args::dsub
size_t dsub
Definition: args.h:53
fasttext::model_name
model_name
Definition: args.h:19