Exemple #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;
}
Exemple #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;
}
Exemple #3
0
annotation annotation_groups_factory::
make(const scribble& scribble) const {
    auto aggregated_entries(aggregate_scribble_entries(scribble));
    auto r(create_annotation(scribble.scope(), aggregated_entries));
    return r;
}