FreeLing
3.1
|
Class parse tree is used to store the results of parsing. More...
#include <language.h>
Public Member Functions | |
parse_tree () | |
Class parse tree is used to store the results of parsing. | |
parse_tree (parse_tree::iterator p) | |
parse_tree (const node &) | |
void | build_node_index (const std::wstring &) |
assign an id to each node and build index | |
void | rebuild_node_index () |
rebuild index maintaining node id's | |
parse_tree::const_iterator | get_node_by_id (const std::wstring &) const |
access the node with given id | |
parse_tree::const_iterator | get_node_by_pos (size_t) const |
access the node by word position | |
parse_tree::iterator | get_node_by_id (const std::wstring &) |
access the node with given id | |
parse_tree::iterator | get_node_by_pos (size_t) |
access the node by word position | |
Private Attributes | |
std::map< std::wstring, parse_tree::iterator > | node_index |
std::vector< parse_tree::iterator > | word_index |
Class parse tree is used to store the results of parsing.
Class parse tree is used to store the results of parsing.
Methods for parse_tree
freeling::parse_tree::parse_tree | ( | const node & | n | ) |
void freeling::parse_tree::build_node_index | ( | const std::wstring & | ) |
assign an id to each node and build index
assign id's to nodes and build index
References freeling::tree< node >::begin(), freeling::tree< node >::end(), int2wstring, and node_index.
parse_tree::const_iterator freeling::parse_tree::get_node_by_id | ( | const std::wstring & | ) | const |
access the node with given id
parse_tree::iterator freeling::parse_tree::get_node_by_id | ( | const std::wstring & | ) |
access the node with given id
parse_tree::const_iterator freeling::parse_tree::get_node_by_pos | ( | size_t | pos | ) | const |
access the node by word position
get leaf node corresponding to word at given position in sentence, const iterator
References pt_node_by_pos.
parse_tree::iterator freeling::parse_tree::get_node_by_pos | ( | size_t | pos | ) |
access the node by word position
get leaf node corresponding to word at given position in sentence, normal iterator
References pt_node_by_pos.
rebuild index maintaining node id's
References freeling::tree< node >::begin(), freeling::tree< node >::end(), node_index, and word_index.
Referenced by freeling::completer::complete().
std::map<std::wstring,parse_tree::iterator> freeling::parse_tree::node_index [private] |
Referenced by build_node_index(), and rebuild_node_index().
std::vector<parse_tree::iterator> freeling::parse_tree::word_index [private] |
Referenced by rebuild_node_index().