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

Method count_ngrams

examples/text_classification_ex.cpp:209–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207 }
208
209 static std::pair<sample_type, sample_type> count_ngrams(const std::vector<string>& tokens)
210 {
211 return {
212 hash_word_ngrams(tokens, min_word_n, max_word_n, num_buckets),
213 hash_char_ngrams(tokens, min_char_n, max_char_n, num_buckets)
214 };
215 }
216
217 tfidf_transformer<sample_type> words = make_tfidf();
218 tfidf_transformer<sample_type> chars = make_tfidf();

Callers

nothing calls this directly

Calls 2

hash_word_ngramsFunction · 0.85
hash_char_ngramsFunction · 0.85

Tested by

no test coverage detected