10 #ifndef META_DOCUMENT_H_
11 #define META_DOCUMENT_H_
14 #include <unordered_map>
40 document(
const std::string&
path =
"[NONE]", doc_id d_id = doc_id{0},
41 const class_label&
label = class_label{
"[NONE]"});
48 void increment(
const std::string& term,
double amount);
53 std::string
path()
const;
58 const class_label&
label()
const;
63 std::string
name()
const;
68 void name(
const std::string& n);
81 double count(
const std::string& term)
const;
86 const std::unordered_map<std::string, double>&
counts()
const;
97 const std::string&
encoding =
"utf-8");
108 const std::string&
content()
const;
113 const std::string&
encoding()
const;
129 void label(class_label label);
148 std::unordered_map<std::string, double>
counts_;