MCPcopy Create free account
hub / github.com/creatale/node-dv / SampleToString

Method SampleToString

deps/tesseract/classify/trainingsampleset.cpp:202–207  ·  view source on GitHub ↗

Returns a string debug representation of the given sample: font, unichar_str, bounding box, page.

Source from the content-addressed store, hash-verified

200// Returns a string debug representation of the given sample:
201// font, unichar_str, bounding box, page.
202STRING TrainingSampleSet::SampleToString(const TrainingSample& sample) const {
203 STRING boxfile_str;
204 MakeBoxFileStr(unicharset_.id_to_unichar(sample.class_id()),
205 sample.bounding_box(), sample.page_num(), &boxfile_str);
206 return STRING(fontinfo_table_.get(sample.font_id()).name) + " " + boxfile_str;
207}
208
209// Gets the combined set of features used by all the samples of the given
210// font/class combination.

Callers 1

ComputeErrorRateMethod · 0.80

Calls 8

MakeBoxFileStrFunction · 0.85
id_to_unicharMethod · 0.80
class_idMethod · 0.80
page_numMethod · 0.80
font_idMethod · 0.80
STRINGClass · 0.70
bounding_boxMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected