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

Method GetCompactClassID

deps/tesseract/classify/sampleiterator.cpp:142–145  ·  view source on GitHub ↗

Returns the index of the current sample in compact charset space, so in a 2-class problem between x and y, the returned indices will all be 0 or 1, and have nothing to do with the unichar_ids. If the charset_map_ is NULL, then this is equal to GetSparseClassID().

Source from the content-addressed store, hash-verified

140// 0 or 1, and have nothing to do with the unichar_ids.
141// If the charset_map_ is NULL, then this is equal to GetSparseClassID().
142int SampleIterator::GetCompactClassID() const {
143 return charset_map_ != NULL ? charset_map_->SparseToCompact(shape_index_)
144 : GetSparseClassID();
145}
146// Returns the index of the current sample in sparse charset space, so
147// in a 2-class problem between x and y, the returned indices will all be
148// x or y, where x and y may be unichar_ids (no shape_table_) or shape_ids

Callers

nothing calls this directly

Calls 1

SparseToCompactMethod · 0.45

Tested by

no test coverage detected