Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

chart Class Reference

Class chart contains an array of cells that constitute a chart. More...

#include <chart.h>

Inheritance diagram for chart:

Inheritance graph
[legend]
Collaboration diagram for chart:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 chart ()
 constructor
int get_size () const
 Get size of the table.
cell get_cell (int, int) const
 get the contents of a cell in a given position
void load_sentence (const sentence &)
 load sentece and init parsing (fill up first row of chart)
void set_grammar (const grammar &)
 set grammar to use in parsing
void parse ()
 Do the parsing.
parse_tree get_tree (int, int, const string &="") const
 navigate through the chart and obtain a parse tree.

Private Member Functions

bool better_edge (const edge &, const edge &) const
 compare two edges when extracting a tree
list< pair< int, int > > cover (int a, int b) const
 obtain a list of cells that cover the subtree under cell (a,b)
int index (int i, int j) const
 compute position of the cell inside the vector
bool can_extend (const string &, int, int) const
 find out whether the cell (i,j) has some inactive edge whose head is the given category
void find_all_rules (const edge &, cell &, int, int) const
 Complete edges in a cell (ce) after inserting a terminal or an inactive edge, using rules whose right part starts with the right token (which may be wildcarded).
bool check_match (const string &, const string &) const
 check match between a (possibly) wildcarded string and a literal.
void dump () const

Private Attributes

int size
 dimension of the chart table (length of the sentece to parse)
const grammargram

Detailed Description

Class chart contains an array of cells that constitute a chart.


Constructor & Destructor Documentation

chart::chart  ) 
 

constructor


Member Function Documentation

bool chart::better_edge const edge ,
const edge
const [private]
 

compare two edges when extracting a tree

bool chart::can_extend const string &  ,
int  ,
int 
const [private]
 

find out whether the cell (i,j) has some inactive edge whose head is the given category

bool chart::check_match const string &  ,
const string & 
const [private]
 

check match between a (possibly) wildcarded string and a literal.

list<pair<int,int> > chart::cover int  a,
int  b
const [private]
 

obtain a list of cells that cover the subtree under cell (a,b)

void chart::dump  )  const [private]
 

void chart::find_all_rules const edge ,
cell ,
int  ,
int 
const [private]
 

Complete edges in a cell (ce) after inserting a terminal or an inactive edge, using rules whose right part starts with the right token (which may be wildcarded).

cell chart::get_cell int  ,
int 
const
 

get the contents of a cell in a given position

int chart::get_size  )  const
 

Get size of the table.

parse_tree chart::get_tree int  ,
int  ,
const string &  = ""
const
 

navigate through the chart and obtain a parse tree.

int chart::index int  i,
int  j
const [private]
 

compute position of the cell inside the vector

void chart::load_sentence const sentence  ) 
 

load sentece and init parsing (fill up first row of chart)

void chart::parse  ) 
 

Do the parsing.

void chart::set_grammar const grammar  ) 
 

set grammar to use in parsing


Member Data Documentation

const grammar* chart::gram [private]
 

int chart::size [private]
 

dimension of the chart table (length of the sentece to parse)


The documentation for this class was generated from the following file:
Generated on Wed Apr 26 12:57:36 2006 for FreeLing by  doxygen 1.4.4