Loading...
Searching...
No Matches
EST_SCFG_Chart Class Reference

`#include <include/EST_SCFG_Chart.h>`

## Public Member Functions

Constructor and initialisation functions
Grammar and parse string initialisation functions
void | set_grammar_rules (LISP r)
| Initialize from LISP rules set.
void | set_grammar_rules (EST_SCFG &grammar)
| Initialize from existing \Ref{EST_SCFG} grammar.
void | setup_wfst (EST_Relation *s, const EST_String &name="name")
void | setup_wfst (EST_Item *s, EST_Item *e, const EST_String &name="name")
parsing functions
void | parse ()
| Parses the loaded WFST with the loaded grammar.
LISP | find_parse ()
| Return the parse in full LISP form.
void | extract_parse (EST_Relation *syn, EST_Relation *word, int force=0)
| Extract parse tree and add it to syn linking leafs to word.
void | extract_parse (EST_Relation *syn, EST_Item *s, EST_Item *e, int force=0)
| Extract parse tree and add it to syn linking leafs to items s to e.

## Detailed Description

A class for parsing with a probabilistic grammars.

The chart (sort of closer to CKY table) consists of indexes of edges indexed by vertex number of mother non-terminal.

The initial values (well-formed substring table) are taken from an \Ref{EST_Stream} with a given feature. The grammar may be specified as LISP rules or as an already constructed \Ref{EST_SCFG}.

This produces a single best parse. It treats the grammar as strictly context free in that the probability of a nonterminal over vertex n to m, is the sum of all the possible analyses of that sub-tree. Only the best analysis is kept for the resulting parse tree.

Author
  Alan W Black (awb@c.nosp@m.str..nosp@m.ed.ac.nosp@m..uk): October 1997

Definition at line 100 of file EST_SCFG_Chart.h.

## Constructor & Destructor Documentation

## EST_SCFG_Chart()

EST_SCFG_Chart::EST_SCFG_Chart | ( |  | ) |

Definition at line 105 of file EST_SCFG_Chart.cc.

## ~EST_SCFG_Chart()

EST_SCFG_Chart::~EST_SCFG_Chart | ( |  | ) |

Definition at line 115 of file EST_SCFG_Chart.cc.

## Member Function Documentation

## set_grammar_rules() [1/2]

void EST_SCFG_Chart::set_grammar_rules | ( | LISP | r | ) |

Initialize from LISP rules set.

Definition at line 132 of file EST_SCFG_Chart.cc.

## set_grammar_rules() [2/2]

void EST_SCFG_Chart::set_grammar_rules | ( | EST_SCFG & | grammar | ) |

Initialize from existing \Ref{EST_SCFG} grammar.

Definition at line 124 of file EST_SCFG_Chart.cc.

## setup_wfst() [1/2]

void EST_SCFG_Chart::setup_wfst | ( | EST_Relation * | s,
|  | const EST_String & | name = "name" )

Initialize for parsing from relation using {\tt name} feature setting up the "Well Formed Substring Table"

Definition at line 137 of file EST_SCFG_Chart.cc.

## setup_wfst() [2/2]

void EST_SCFG_Chart::setup_wfst | ( | EST_Item * | s,
|  | EST_Item * | e,
|  | const EST_String & | name = "name" )

Initialize for parsing from s to e using {\tt name} feature setting up the "Well Formed Substring Table"

Definition at line 144 of file EST_SCFG_Chart.cc.

## parse()

void EST_SCFG_Chart::parse | ( | void |  | ) |

Parses the loaded WFST with the loaded grammar.

Definition at line 278 of file EST_SCFG_Chart.cc.

## find_parse()

LISP EST_SCFG_Chart::find_parse | ( |  | ) |

Return the parse in full LISP form.

Definition at line 286 of file EST_SCFG_Chart.cc.

## extract_parse() [1/2]

void EST_SCFG_Chart::extract_parse | ( | EST_Relation * | syn,
|  | EST_Relation * | word,
|  | int | force = 0 )

Extract parse tree and add it to syn linking leafs to word.

Definition at line 299 of file EST_SCFG_Chart.cc.

## extract_parse() [2/2]

void EST_SCFG_Chart::extract_parse | ( | EST_Relation * | syn,
|  | EST_Item * | s,
|  | EST_Item * | e,
|  | int | force = 0 )

Extract parse tree and add it to syn linking leafs to items s to e.

Definition at line 310 of file EST_SCFG_Chart.cc.

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

- include/EST_SCFG_Chart.h
- grammar/scfg/EST_SCFG_Chart.cc