| 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 | { |
nothing calls this directly
no test coverage detected