ModErn Text Analysis
META Enumerates Textual Applications
tree_transformer.h
Go to the documentation of this file.
1 
9 #ifndef META_PARSE_TREE_TRANSFORMER_H_
10 #define META_PARSE_TREE_TRANSFORMER_H_
11 
12 #include <memory>
13 #include "parser/trees/visitors/visitor.h"
14 
15 namespace meta
16 {
17 namespace parser
18 {
19 
20 class node;
21 
25 class tree_transformer : public const_visitor<std::unique_ptr<node>>
26 {
27  public:
28  virtual std::unique_ptr<node> operator()(const leaf_node&) = 0;
29  virtual std::unique_ptr<node> operator()(const internal_node&) = 0;
30 };
31 }
32 }
33 #endif
An internal node in a parse tree.
Definition: internal_node.h:28
virtual std::unique_ptr< node > operator()(const leaf_node &)=0
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
Abstract base class for tree transformers.
Definition: tree_transformer.h:25
Abstract base class for visitors over parse trees that do not modify the underlying tree...
Definition: visitor.h:25
A leaf node (pre-terminal) in a parse tree.
Definition: leaf_node.h:24