args.h
Go to the documentation of this file.
#ifndef FASTTEXT_ARGS_H
#define FASTTEXT_ARGS_H
#include <istream>
#include <ostream>
#include <string>
namespace fasttext {
enum class model_name : int {cbow=1, sg, sup};
enum class loss_name : int {hs=1, ns, softmax};
class Args {
public:
Args();
std::string input;
std::string test;
std::string output;
double lr;
int lrUpdateRate;
int dim;
int ws;
int epoch;
int minCount;
int minCountLabel;
int neg;
int wordNgrams;
loss_name loss;
model_name model;
int bucket;
int minn;
int maxn;
int thread;
double t;
std::string label;
int verbose;
std::string pretrainedVectors;
int saveOutput;
bool qout;
bool retrain;
bool qnorm;
size_t cutoff;
size_t dsub;
void parseArgs(int, char**);
void printHelp();
void printBasicHelp();
void printDictionaryHelp();
void printTrainingHelp();
void printQuantizationHelp();
void save(std::ostream&);
void load(std::istream&);
};
}
#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