| 50 | }; |
| 51 | |
| 52 | static void usage(std::ostream& os, const char* program, Task task) { |
| 53 | if (task == TRAIN) |
| 54 | os << "usage: " << program << " -t train_file -d dev_file [options]" << std::endl; |
| 55 | else if (task == TRAIN_SUP) |
| 56 | os << "usage: " << program << " -t train_file -d dev_file -tl train_labels_file -dl dev-labels_file [options]" << std::endl; |
| 57 | else if (task == TEST) |
| 58 | os << "usage: " << program << " -ts test_file [options]" << std::endl; |
| 59 | else |
| 60 | os << "usage: " << program << " [options]" << std::endl; |
| 61 | |
| 62 | os << std::endl |
| 63 | << "options:" << std::endl |
| 64 | << " -b int, --batch_size int" << std::endl |
| 65 | << " -bid, --bidirectional" << std::endl |
| 66 | << " -c filename, --clusters filename" << std::endl |
| 67 | << " -d filename, --dev filename" << std::endl |
| 68 | << " -dic filename, --dict filename" << std::endl |
| 69 | << " -D float, --dropout_rate float" << std::endl |
| 70 | << " -e0 float, --eta0 float" << std::endl |
| 71 | << " -edr float, --eta_decay_rate float" << std::endl |
| 72 | << " -edoe float, --eta_decay_onset_epoch float" << std::endl |
| 73 | << " -i int, --input_size int" << std::endl |
| 74 | << " -l int, --num_layers int" << std::endl |
| 75 | << " -m filename, --model filename" << std::endl |
| 76 | << " -n string, --name string" << std::endl |
| 77 | << " -N int, --num_epochs int" << std::endl |
| 78 | << " -nb filename, --nbest filename" << std::endl |
| 79 | << " -p filename, --paths filename" << std::endl |
| 80 | << " -s, --sample" << std::endl |
| 81 | << " -t filename, --train filename" << std::endl |
| 82 | << " -ts filename, --test filename" << std::endl |
| 83 | << " --help" << std::endl; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * \brief Get parameters from command line arguments |