264 SetupConfigMap(shape_table, &config_map);
276 unicharset = &shape_set;
280 for (
int s = 0; s < num_shapes; ++s) {
288 int num_configs = shape_table->
NumShapes();
290 for (
int s = 0; s < num_configs; ++s) {
291 int unichar_id, font_id;
292 if (unicharset == &shape_set) {
299 const char* class_label = unicharset->
id_to_unichar(unichar_id);
300 mf_classes = ClusterOneConfig(s, class_label, mf_classes, *shape_table,
303 STRING inttemp_file = file_prefix;
304 inttemp_file +=
"inttemp";
305 STRING pffmtable_file = file_prefix;
306 pffmtable_file +=
"pffmtable";
310 *shape_table, float_classes,
313 delete [] float_classes;
318 if (!FLAGS_test_ch.empty()) {
320 printf(
"Hit return to exit...\n");
321 while (getchar() !=
'\n');
void GetFirstUnicharAndFont(int shape_id, int *unichar_id, int *font_id) const
MasterTrainer * LoadTrainingData(int argc, const char *const *argv, bool replication, ShapeTable **shape_table, STRING *file_prefix)
const char *const id_to_unichar(UNICHAR_ID id) const
void ParseArguments(int *argc, char ***argv)
const int kMaxShapeLabelLength
const UNICHARSET & unicharset() const
void WriteInttempAndPFFMTable(const UNICHARSET &unicharset, const UNICHARSET &shape_set, const ShapeTable &shape_table, CLASS_STRUCT *float_classes, const char *inttemp_file, const char *pffmtable_file)
void unichar_insert(const char *const unichar_repr)
void FreeLabeledClassList(LIST ClassList)
const char * string() const
CLASS_STRUCT * SetUpForFloat2Int(const UNICHARSET &unicharset, LIST LabeledClassList)
bool AnyMultipleUnichars() const
virtual int SparseToCompact(int sparse_index) const
void WriteShapeTable(const STRING &file_prefix, const ShapeTable &shape_table)