Пример #1
0
void depth_featurizer::tree_tokenize(corpus::document& doc,
                                     const parser::parse_tree& tree) const
{
    height_visitor vtor;
    auto rep = "depth-" + std::to_string(tree.visit(vtor));
    doc.increment(rep, 1);
}
void semi_skeleton_featurizer::tree_tokenize(
    corpus::document& doc, const parser::parse_tree& tree) const
{
    semi_skeleton_visitor vtor{doc};
    tree.visit(vtor);
}
Пример #3
0
void skeleton_featurizer::tree_tokenize(const parser::parse_tree& tree,
                                        featurizer& counts) const
{
    skeleton_visitor vtor{counts};
    tree.visit(vtor);
}