MCPcopy Create free account
hub / github.com/davisking/dlib / segmenter_params__str__

Function segmenter_params__str__

tools/python/src/sequence_segmenter.cpp:280–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278
279
280std::string segmenter_params__str__(const segmenter_params& p)
281{
282 std::ostringstream sout;
283 if (p.use_BIO_model)
284 sout << "BIO,";
285 else
286 sout << "BILOU,";
287
288 if (p.use_high_order_features)
289 sout << "highFeats,";
290 else
291 sout << "lowFeats,";
292
293 if (p.allow_negative_weights)
294 sout << "signed,";
295 else
296 sout << "non-negative,";
297
298 sout << "win="<<p.window_size << ",";
299 sout << "threads="<<p.num_threads << ",";
300 sout << "eps="<<p.epsilon << ",";
301 sout << "cache="<<p.max_cache_size << ",";
302 if (p.be_verbose)
303 sout << "verbose,";
304 else
305 sout << "non-verbose,";
306 sout << "C="<<p.C;
307 return trim(sout.str());
308}
309
310std::string segmenter_params__repr__(const segmenter_params& p)
311{

Callers 1

segmenter_params__repr__Function · 0.85

Calls 2

trimFunction · 0.85
strMethod · 0.45

Tested by

no test coverage detected