|
FreeLing
3.0
|
Class sentence is just a list of words that someone (the splitter) has validated it as a complete sentence. More...
#include <language.h>


Public Member Functions | |
| sentence () | |
| Class sentence is just a list of words that someone (the splitter) has validated it as a complete sentence. | |
| sentence (const std::list< word > &) | |
| sentence (const sentence &) | |
| Copy constructor. | |
| sentence & | operator= (const sentence &) |
| assignment | |
| const word & | operator[] (size_t) const |
| positional access to a word | |
| word & | operator[] (size_t) |
| unsigned int | num_kbest () const |
| find out how many kbest sequences the tagger computed | |
| void | push_back (const word &) |
| add a word to the sentence | |
| void | rebuild_word_index () |
| rebuild word positional index | |
| void | clear () |
| Clear sentence and possible trees. | |
| void | set_parse_tree (const parse_tree &, int k=0) |
| Set the parse tree. | |
| parse_tree & | get_parse_tree (int k=0) |
| Obtain the parse tree. | |
| const parse_tree & | get_parse_tree (int k=0) const |
| bool | is_parsed () const |
| Find out whether the sentence is parsed. | |
| void | set_dep_tree (const dep_tree &, int k=0) |
| Set the dependency tree. | |
| dep_tree & | get_dep_tree (int k=0) |
| Obtain the parse dependency tree. | |
| const dep_tree & | get_dep_tree (int k=0) const |
| bool | is_dep_parsed () const |
| Find out whether the sentence is dependency parsed. | |
| std::vector< word > | get_words () const |
| get word list (useful for perl API) | |
| sentence::iterator | words_begin () |
| get iterators to word list (useful for perl/java API) | |
| sentence::const_iterator | words_begin () const |
| sentence::iterator | words_end () |
| sentence::const_iterator | words_end () const |
Private Member Functions | |
| void | clone (const sentence &) |
| clone sentence (used by assignment/copy constructors) | |
Private Attributes | |
| std::vector< word * > | wpos |
| std::map< int, parse_tree > | pts |
| std::map< int, dep_tree > | dts |
Class sentence is just a list of words that someone (the splitter) has validated it as a complete sentence.
It may include a parse tree.
| sentence::sentence | ( | const std::list< word > & | ) |
| sentence::sentence | ( | const sentence & | s | ) |
Copy constructor.
References clone().
| void sentence::clear | ( | ) |
| void sentence::clone | ( | const sentence & | s | ) | [private] |
clone sentence (used by assignment/copy constructors)
Clone sentence.
References clear(), dts, pts, push_back(), and wpos.
Referenced by operator=(), and sentence().
| dep_tree & sentence::get_dep_tree | ( | int | k = 0 | ) |
Obtain the parse dependency tree.
References dts.
| const dep_tree & sentence::get_dep_tree | ( | int | k = 0 | ) | const |
References dts.
| parse_tree & sentence::get_parse_tree | ( | int | k = 0 | ) |
| const parse_tree & sentence::get_parse_tree | ( | int | k = 0 | ) | const |
References pts.
| vector< word > sentence::get_words | ( | ) | const |
get word list (useful for perl API)
obtain list of words (useful for perl APIs)
| bool sentence::is_dep_parsed | ( | ) | const |
Find out whether the sentence is dependency parsed.
References dts.
| bool sentence::is_parsed | ( | ) | const |
Find out whether the sentence is parsed.
References pts.
| unsigned int sentence::num_kbest | ( | ) | const |
find out how many kbest sequences the tagger computed
Referenced by dep_txala::analyze().
| void sentence::push_back | ( | const word & | w | ) |
| void sentence::rebuild_word_index | ( | ) |
rebuild word positional index
rebuild word index by position
References wpos.
Referenced by bioner::analyze(), dictionary::analyze(), automat::analyze(), and POS_tagger::retokenize().
| void sentence::set_dep_tree | ( | const dep_tree & | tr, |
| int | k = 0 |
||
| ) |
| void sentence::set_parse_tree | ( | const parse_tree & | tr, |
| int | k = 0 |
||
| ) |
| sentence::iterator sentence::words_begin | ( | ) |
get iterators to word list (useful for perl/java API)
obtain iterators (useful for perl/java APIs)
| sentence::const_iterator sentence::words_begin | ( | ) | const |
| sentence::iterator sentence::words_end | ( | ) |
| sentence::const_iterator sentence::words_end | ( | ) | const |
std::map<int,dep_tree> sentence::dts [private] |
Referenced by clear(), clone(), get_dep_tree(), is_dep_parsed(), sentence(), and set_dep_tree().
std::map<int,parse_tree> sentence::pts [private] |
Referenced by clear(), clone(), get_parse_tree(), is_parsed(), sentence(), and set_parse_tree().
std::vector<word*> sentence::wpos [private] |
Referenced by clear(), clone(), operator[](), push_back(), rebuild_word_index(), and sentence().
1.7.6.1