FreeLing  4.0
Public Member Functions | Public Attributes | Protected Attributes
freeling::node Class Reference

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>

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

List of all members.

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 wordget_word () const
 get node word
wordget_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
wordw
 sentence word related to the node (if leaf)

Detailed Description

Class node stores nodes of a parse_tree Each node in the tree is either a label (intermediate node) or a word (leaf node)


Constructor & Destructor Documentation

constructors

References chunk, head, and nodeid.

freeling::node::node ( const std::wstring &  )

Member Function Documentation

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.

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.

set node word

References w.


Member Data Documentation

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().


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