FreeLing
4.0
|
class dep_tree stores a dependency tree More...
#include <language.h>
Public Member Functions | |
dep_tree () | |
tree<node>& depnode::get_link_ref() { return (link);} /// (useful for Java API) | |
dep_tree (const depnode &) | |
dep_tree::const_iterator | get_node_by_pos (size_t) const |
get depnode corresponding to word in given position | |
dep_tree::iterator | get_node_by_pos (size_t) |
get depnode corresponding to word in given position | |
void | rebuild_node_index () |
rebuild index maintaining words positions | |
Static Public Member Functions | |
static size_t | get_first_word (dep_tree::const_iterator) |
obtain position of first/last word in the span subsumed by a dep_tree | |
static size_t | get_last_word (dep_tree::const_iterator) |
obtain position of last word in the span subsumed by a dep_tree | |
static void | PrintDepTree (dep_tree::const_iterator n, int depth) |
print a dependency tree (debugging purposes mainly) | |
Private Attributes | |
std::vector< dep_tree::iterator > | word_index |
class dep_tree stores a dependency tree
tree<node>& depnode::get_link_ref() { return (link);} /// (useful for Java API)
class dep_tree stores a dependency tree Constructors for dep_tree
freeling::dep_tree::dep_tree | ( | const depnode & | n | ) |
size_t freeling::dep_tree::get_first_word | ( | dep_tree::const_iterator | t | ) | [static] |
obtain position of first/last word in the span subsumed by a dep_tree
obtain position of first word in the span subsumed by a dep_tree
References freeling::basic_tree_iterator< T, N >::sibling_begin(), and freeling::basic_tree_iterator< T, N >::sibling_end().
size_t freeling::dep_tree::get_last_word | ( | dep_tree::const_iterator | t | ) | [static] |
obtain position of last word in the span subsumed by a dep_tree
References freeling::basic_tree_iterator< T, N >::sibling_begin(), and freeling::basic_tree_iterator< T, N >::sibling_end().
dep_tree::const_iterator freeling::dep_tree::get_node_by_pos | ( | size_t | pos | ) | const |
get depnode corresponding to word in given position
get depnode corresponding to word in given position, const iterator
References word_index.
dep_tree::iterator freeling::dep_tree::get_node_by_pos | ( | size_t | pos | ) |
get depnode corresponding to word in given position
get depnode corresponding to word in given position, normal iterator
References word_index.
void freeling::dep_tree::PrintDepTree | ( | dep_tree::const_iterator | n, |
int | depth | ||
) | [static] |
print a dependency tree (debugging purposes mainly)
Print a parse tree -- tracing purposes mainly.
References freeling::word::get_form(), freeling::word::get_lemma(), freeling::word::get_tag(), freeling::tree< depnode >::last, freeling::basic_tree_iterator< T, N >::num_children(), freeling::basic_tree_iterator< T, N >::sibling_begin(), and freeling::basic_tree_iterator< T, N >::sibling_end().
rebuild index maintaining words positions
rebuild index maintaining word positions
References freeling::tree< depnode >::begin(), freeling::tree< depnode >::end(), and word_index.
std::vector<dep_tree::iterator> freeling::dep_tree::word_index [private] |
Referenced by get_node_by_pos(), and rebuild_node_index().