FreeLing
4.0
|
Class node stores nodes of a parse_tree Each node in the tree is either a label (intermediate node) or a word (leaf node) More...
#include <language.h>
Public Member Functions | |
node () | |
constructors | |
node (const std::wstring &) | |
const std::wstring & | get_node_id () const |
get node identifier | |
void | set_node_id (const std::wstring &) |
set node identifier | |
const std::wstring & | get_label () const |
get node label | |
bool | has_word () const |
find out whether the node has an associated word | |
const word & | get_word () const |
get node word | |
word & | get_word () |
get reference to node word | |
void | set_label (const std::wstring &) |
set node label | |
void | set_word (word &) |
set node word | |
bool | is_head () const |
find out whether node is a head | |
void | set_head (const bool) |
set whether node is a head | |
bool | is_chunk () const |
find out whether node is a chunk | |
void | set_chunk (const int) |
set position of the chunk in the sentence | |
int | get_chunk_ord () const |
get position of the chunk in the sentence | |
Public Attributes | |
std::vector< std::wstring > | user |
user-managed data, we just store it. | |
Protected Attributes | |
std::wstring | nodeid |
node identifier | |
bool | head |
is the node the head of the rule? | |
int | chunk |
is the node the root of a chunk? which? | |
std::wstring | label |
node label | |
word * | w |
sentence word related to the node (if leaf) |
Class node stores nodes of a parse_tree Each node in the tree is either a label (intermediate node) or a word (leaf node)
freeling::node::node | ( | const std::wstring & | ) |
int freeling::node::get_chunk_ord | ( | ) | const |
get position of the chunk in the sentence
References chunk.
const wstring & freeling::node::get_label | ( | ) | const |
get node label
const wstring & freeling::node::get_node_id | ( | ) | const |
get node identifier
References nodeid.
const word & freeling::node::get_word | ( | ) | const |
get node word
References w.
word & freeling::node::get_word | ( | ) |
get reference to node word
References w.
bool freeling::node::has_word | ( | ) | const |
find out whether the node has an associated word
References w.
bool freeling::node::is_chunk | ( | ) | const |
find out whether node is a chunk
References chunk.
bool freeling::node::is_head | ( | ) | const |
find out whether node is a head
References head.
void freeling::node::set_chunk | ( | const int | c | ) |
set position of the chunk in the sentence
References chunk.
void freeling::node::set_head | ( | const bool | h | ) |
set whether node is a head
References head.
void freeling::node::set_label | ( | const std::wstring & | ) |
set node label
void freeling::node::set_node_id | ( | const std::wstring & | ) |
set node identifier
References nodeid.
void freeling::node::set_word | ( | word & | wd | ) |
set node word
References w.
int freeling::node::chunk [protected] |
is the node the root of a chunk? which?
Referenced by get_chunk_ord(), is_chunk(), node(), and set_chunk().
bool freeling::node::head [protected] |
is the node the head of the rule?
Referenced by is_head(), node(), and set_head().
std::wstring freeling::node::label [protected] |
node label
std::wstring freeling::node::nodeid [protected] |
node identifier
Referenced by get_node_id(), node(), and set_node_id().
std::vector<std::wstring> freeling::node::user |
user-managed data, we just store it.
word* freeling::node::w [protected] |
sentence word related to the node (if leaf)
Referenced by get_word(), has_word(), and set_word().