ModErn Text Analysis
META Enumerates Textual Applications
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
parser
trees
leaf_node.h
Go to the documentation of this file.
1
9
#ifndef META_PARSE_LEAF_NODE_H_
10
#define META_PARSE_LEAF_NODE_H_
11
12
#include "
parser/trees/node.h
"
13
#include "
util/clonable.h
"
14
#include "
util/optional.h
"
15
16
namespace
meta
17
{
18
namespace
parser
19
{
20
24
class
leaf_node
:
public
util::clonable
<node, leaf_node>
25
{
26
public
:
27
using
base
=
util::clonable<node, leaf_node>
;
29
using
base::base;
30
36
leaf_node
(class_label cat, std::string
word
);
37
41
const
util::optional<std::string>
&
word
()
const
;
42
43
bool
is_leaf()
const override
;
44
45
bool
equal(
const
node
& other)
const override
;
46
47
private
:
51
const
util::optional<std::string>
word_
;
52
};
53
}
54
}
55
56
#endif
meta::parser::node
A single node in a parse tree for a sentence.
Definition:
node.h:24
meta::util::optional< std::string >
optional.h
node.h
meta::parser::leaf_node::leaf_node
leaf_node(class_label cat, std::string word)
Constructs a new leaf node with the given category and word.
Definition:
leaf_node.cpp:13
meta::parser::leaf_node::word_
const util::optional< std::string > word_
The optional word for this leaf node.
Definition:
leaf_node.h:51
meta::util::multilevel_clonable
Template class to facilitate polymorphic cloning.
Definition:
clonable.h:28
clonable.h
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::leaf_node::word
const util::optional< std::string > & word() const
Definition:
leaf_node.cpp:19
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