Пример #1
0
std::size_t scribble_hasher::hash(const scribble& v) {
    std::size_t seed(0);

    combine(seed, hash_std_list_std_pair_std_string_std_string(v.entries()));
    combine(seed, v.scope());
    combine(seed, hash_std_vector_std_string(v.candidate_labels()));

    return seed;
}
Пример #2
0
std::unordered_map<std::string, std::list<std::string >>
        annotation_groups_factory::
aggregate_scribble_entries(const scribble& scribble) const {
    std::unordered_map<std::string, std::list<std::string> > r;

    for (const auto& entry : scribble.entries())
        r[entry.first].push_front(entry.second);

    return r;
}