MCPcopy Create free account
hub / github.com/davisking/dlib / operator()

Method operator()

examples/text_classification_ex.cpp:124–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 }
123
124 sample_type operator()(const string& message) const
125 {
126 const auto [w, c] = count_ngrams(tokenize(message));
127 sample_type x = words(w);
128 for (const auto& [dimension, value] : chars(c))
129 x.emplace_back(words.vocabulary_size() + dimension, value);
130 return x;
131 }
132
133 unsigned long dimensions() const
134 {

Callers

nothing calls this directly

Calls 2

emplace_backMethod · 0.80
vocabulary_sizeMethod · 0.80

Tested by

no test coverage detected