ModErn Text Analysis
META Enumerates Textual Applications
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
parser
trees
visitors
leaf_node_finder.h
Go to the documentation of this file.
1
9
#ifndef META_PARSER_LEAF_NODE_FINDER_H_
10
#define META_PARSER_LEAF_NODE_FINDER_H_
11
12
#include <memory>
13
#include <vector>
14
15
#include "parser/trees/visitors/visitor.h"
16
17
namespace
meta
18
{
19
namespace
parser
20
{
21
29
class
leaf_node_finder
:
public
const_visitor
<void>
30
{
31
public
:
32
void
operator()
(
const
leaf_node
&)
override
;
33
void
operator()
(
const
internal_node
&)
override
;
34
41
std::vector<std::unique_ptr<leaf_node>>
leaves
();
42
43
private
:
45
std::vector<std::unique_ptr<leaf_node>>
leaves_
;
46
};
47
48
49
}
50
}
51
52
#endif
meta::parser::leaf_node_finder::operator()
void operator()(const leaf_node &) override
Definition:
leaf_node_finder.cpp:16
meta::parser::internal_node
An internal node in a parse tree.
Definition:
internal_node.h:28
meta::parser::leaf_node_finder::leaves
std::vector< std::unique_ptr< leaf_node > > leaves()
Returns the leaf nodes found by the visitor.
Definition:
leaf_node_finder.cpp:29
meta
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retreival, data mining, and other applications of text processing.
Definition:
analyzer.h:24
meta::parser::const_visitor
Abstract base class for visitors over parse trees that do not modify the underlying tree...
Definition:
visitor.h:25
meta::parser::leaf_node_finder
This is a visitor that finds all of the leaf nodes in a parse tree.
Definition:
leaf_node_finder.h:29
meta::parser::leaf_node_finder::leaves_
std::vector< std::unique_ptr< leaf_node > > leaves_
The storage for the leaf nodes found so far.
Definition:
leaf_node_finder.h:45
meta::parser::leaf_node
A leaf node (pre-terminal) in a parse tree.
Definition:
leaf_node.h:24
Generated on Tue Mar 3 2015 23:20:16 for ModErn Text Analysis by
1.8.9.1