wrtn_grammar Class Reference
Class wrtn_grammar represents a weighted recursive transition network.
More...
#include <wrtn_grammar.h>
|
Public Types |
typedef wrtn_pattern::input_type | input_type |
typedef wrtn_pattern::output_type | output_type |
Public Member Functions |
| wrtn_grammar (ling_def *ldef) |
| constructor
|
| wrtn_grammar (const boost::filesystem::path &path, ling_def *ldef) |
| constructor
|
int | start () const |
| return the axiom index
|
const std::string & | start_name () const |
| return the name of the axiom
|
int | size () const |
| return the number of patterns of the grammar
|
int | get_pat_idx (const std::string &name) const |
| return the index of a given pattern
|
wrtn_pattern & | operator[] (int no) |
| return the pattern at a given index
|
const wrtn_pattern & | operator[] (int no) const |
| return the pattern at a given index
|
int | add_pattern (const wrtn_pattern &pattern) |
| add a pattern to the wrtn_grammar
|
int | add_pattern (const boost::filesystem::path &patternpath, const std::string &name) |
| add a pattern to the wrtn grammar
|
void | write (const boost::filesystem::path &path) const |
| write wrtn grammar in a file in XML
|
void | write_xml (xmlwriter &writer) const |
void | read (const boost::filesystem::path &path) |
| read a wrtn from an XML file
|
void | read_xml (xmlNode *node) |
Public Attributes |
ling_def * | lingdef |
| contains the lingdef used
|
std::vector< wrtn_pattern > | patterns |
std::map< std::string, int > | pat_map |
| is the mapping from a pattern name to the pattern index in patterns
|
int | axiom |
| is the index of the axiom
|
Detailed Description
Class wrtn_grammar represents a weighted recursive transition network.
Constructor & Destructor Documentation
wrtn_grammar::wrtn_grammar |
( |
ling_def * |
ldef |
) |
[inline] |
constructor
- Parameters:
-
| ldef | is the lingdef to be used |
wrtn_grammar::wrtn_grammar |
( |
const boost::filesystem::path & |
path, |
|
|
ling_def * |
ldef | |
|
) |
| | |
constructor
- Parameters:
-
| path | is the path of the grammar |
| ldef | is the lingdef to be used |
Member Function Documentation
int wrtn_grammar::add_pattern |
( |
const boost::filesystem::path & |
patternpath, |
|
|
const std::string & |
name | |
|
) |
| | |
add a pattern to the wrtn grammar
- Parameters:
-
| path | is the path of the file of the pattern |
| name | is the name of the pattern |
int wrtn_grammar::add_pattern |
( |
const wrtn_pattern & |
pattern |
) |
|
add a pattern to the wrtn_grammar
add pattern in wrtn grammar
- Parameters:
-
| pattern | is the pattern to be added |
int wrtn_grammar::get_pat_idx |
( |
const std::string & |
name |
) |
const [inline] |
return the index of a given pattern
- Parameters:
-
| name | is the name of the pattern |
const wrtn_pattern& wrtn_grammar::operator[] |
( |
int |
no |
) |
const [inline] |
return the pattern at a given index
- Parameters:
-
| no | is the index of the pattern |
return the pattern at a given index
- Parameters:
-
| no | is the index of the pattern |
void wrtn_grammar::read |
( |
const boost::filesystem::path & |
path |
) |
|
read a wrtn from an XML file
- Parameters:
-
| path | is the path of the file |
void wrtn_grammar::write |
( |
const boost::filesystem::path & |
path |
) |
const |
write wrtn grammar in a file in XML
- Parameters:
-
| path | is the path of the file |
The documentation for this class was generated from the following files:
Generated on Fri Nov 24 06:40:31 2006 for OUTILEX by
1.4.7