FreeLing  3.1
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
freeling::sentence Class Reference

Class sentence is just a list of words that someone (the splitter) has validated it as a complete sentence. More...

#include <language.h>

Inheritance diagram for freeling::sentence:
Inheritance graph
[legend]
Collaboration diagram for freeling::sentence:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::pair
< std::wstring, std::map< int,
std::wstring > > 
pred_arg_set

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.
sentenceoperator= (const sentence &)
 assignment
const wordoperator[] (size_t) const
 positional access to a word
wordoperator[] (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_sentence_id (const std::wstring &)
 Set sentence identifier.
std::wstring get_sentence_id ()
 Get sentence identifier.
void set_parse_tree (const parse_tree &, int k=0)
 Set the parse tree.
parse_treeget_parse_tree (int k=0)
 Obtain the parse tree.
const parse_treeget_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_treeget_dep_tree (int k=0)
 Obtain the parse dependency tree.
const dep_treeget_dep_tree (int k=0) const
bool is_dep_parsed () const
 Find out whether the sentence is dependency parsed.
processor_statusget_processing_status ()
 get status at the top of stack
const processor_statusget_processing_status () const
void set_processing_status (processor_status *)
 push status into the stack
void clear_processing_status ()
 pop top status, and free it
std::vector< wordget_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

Public Attributes

std::map< int, pred_arg_setpred_args

Private Member Functions

void clone (const sentence &)
 Clone sentence.

Private Attributes

std::wstring sent_id
std::vector< word * > wpos
std::map< int, parse_treepts
std::map< int, dep_treedts
std::list< processor_status * > status

Detailed Description

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.


Member Typedef Documentation

typedef std::pair<std::wstring, std::map<int,std::wstring> > freeling::sentence::pred_arg_set

Constructor & Destructor Documentation

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. Create a new sentence.

References dts, pts, sent_id, status, and wpos.

freeling::sentence::sentence ( const std::list< word > &  )

Copy constructor.

References clone().


Member Function Documentation

Clear sentence and possible trees.

References clear_processing_status(), dts, pts, status, and wpos.

Referenced by clone().

pop top status, and free it

References status.

Referenced by freeling::dep_txala::analyze(), clear(), and freeling::automat< quantities_status >::matching().

void freeling::sentence::clone ( const sentence s) [private]

Clone sentence.

References clear(), dts, pts, push_back(), sent_id, status, and wpos.

Referenced by operator=(), and sentence().

Obtain the parse dependency tree.

References dts.

const dep_tree & freeling::sentence::get_dep_tree ( int  k = 0) const

References dts.

Obtain the parse tree.

References pts.

Referenced by freeling::dep_txala::analyze().

References pts.

get status at the top of stack

get/set processing status

References status.

Referenced by freeling::automat< quantities_status >::BuildMultiword(), and freeling::locutions::ComputeToken().

References status.

Get sentence identifier.

References sent_id.

get word list (useful for perl API)

obtain list of words (useful for perl APIs)

Find out whether the sentence is dependency parsed.

References dts.

Referenced by rebuild_word_index().

Find out whether the sentence is parsed.

References pts.

Referenced by rebuild_word_index().

unsigned int freeling::sentence::num_kbest ( ) const

find out how many kbest sequences the tagger computed

Referenced by freeling::dep_txala::analyze().

sentence & freeling::sentence::operator= ( const sentence s)

assignment

Assignment.

References clone().

const word & freeling::sentence::operator[] ( size_t  i) const

positional access to a word

References wpos.

word & freeling::sentence::operator[] ( size_t  i)

References wpos.

void freeling::sentence::push_back ( const word w)

add a word to the sentence

References wpos.

Referenced by clone().

void freeling::sentence::set_dep_tree ( const dep_tree tr,
int  k = 0 
)

Set the dependency tree.

References dts.

Referenced by freeling::dep_txala::analyze().

void freeling::sentence::set_parse_tree ( const parse_tree tr,
int  k = 0 
)

Set the parse tree.

References pts.

Referenced by freeling::dep_txala::analyze().

push status into the stack

References status.

Referenced by freeling::dep_txala::analyze(), and freeling::automat< quantities_status >::matching().

void freeling::sentence::set_sentence_id ( const std::wstring &  )

Set sentence identifier.

References sent_id.

sentence::iterator freeling::sentence::words_begin ( )

get iterators to word list (useful for perl/java API)

obtain iterators (useful for perl/java APIs)

sentence::const_iterator freeling::sentence::words_begin ( ) const
sentence::iterator freeling::sentence::words_end ( )
sentence::const_iterator freeling::sentence::words_end ( ) const

Member Data Documentation

std::map<int,dep_tree> freeling::sentence::dts [private]
std::map<int,parse_tree> freeling::sentence::pts [private]
std::wstring freeling::sentence::sent_id [private]
std::vector<word*> freeling::sentence::wpos [private]

The documentation for this class was generated from the following files: