cyk module).
More...Data Structures | |
| struct | InterpretationIterator |
| Syntactic interpretation iterator. More... | |
Enumerations | |
| enum | ParsingMode { ALL_SOLUTIONS = 0, ONE_BEST } |
| Syntactic parsing process mode. More... | |
Functions | |
| gboolean | equal (const Probability x, const Probability y, const double limit) |
| InterpretationIterator * | interpretationIteratorCreate (const ParsingChart *chart, const unsigned int row, const unsigned int column, const gboolean only_top_nt) |
| void | interpretationIteratorFree (InterpretationIterator **iterator) |
| ParsingChart * | parse (const char *sentence, const Grammar *grammar, const ParsingChartInitConfig *init_config, const ParsingMode parsing_mode) |
| gboolean | interpretationIteratorGetNext (InterpretationIterator *iterator, ParsingResult *output) |
| gboolean | interpretationIteratorGetNextMPP (InterpretationIterator *iterator, ParsingResult *output) |
| void | interpretationIteratorGoToFirst (InterpretationIterator *iterator) |
| void | interpretationIteratorGoToFirstMPP (InterpretationIterator *iterator) |
| void | parsingChartGetMostProbableInterpretation (const ParsingChart *parsing_chart, const unsigned int row, const unsigned int column, const gboolean only_top_nt, ParsingResult *output) |
Variables | |
| void(*[ParsingMode parsing_mode]) | parsingChartAutoFill (ParsingChart *chart, const unsigned int row, const unsigned int column, const unsigned int max_column) |
| void(*[ParsingMode parsing_mode]) | parsingChartApplyParsing (ParsingChart *chart) |
| void(* | parsingChartApplyParsing [])(ParsingChart *) |
cyk module).
SlpTK Library 0.6.0
<parser.h> Antonin Merçay (revision on 01.02.2005)
| enum ParsingMode |
Syntactic parsing process mode.
| gboolean equal | ( | const Probability | x, | |
| const Probability | y, | |||
| const double | limit | |||
| ) |
Test if the difference between two Probability values is less than a chosen limit
| [in] | x | The first value to compare |
| [in] | y | The second value to compare |
| [in] | limit | The maximal absolute difference allowed to declare equality |
TRUE if the values are though equal, FALSE otherwiseequal | InterpretationIterator * interpretationIteratorCreate | ( | const ParsingChart * | chart, | |
| const unsigned int | row, | |||
| const unsigned int | column, | |||
| const gboolean | only_top_nt | |||
| ) |
Instanciate and initialize a syntactic interpretation iterator (constructor)
| [in] | chart | The source parsing chart |
| [in] | row | The starting row of the interpretations to consider (1 to size) |
| [in] | column | The starting column of the interpretations to consider (1 to size - row + 1) |
| [in] | only_top_nt | Set if only interpretations that begin with the higher level non-terminal must be taken into account |
| void interpretationIteratorFree | ( | InterpretationIterator ** | iterator | ) |
Free the memory allocated to a syntactic interpretation iterator (destructor)
| [in] | iterator | The interpretation iterator to free |
| gboolean interpretationIteratorGetNext | ( | InterpretationIterator * | iterator, | |
| ParsingResult * | output | |||
| ) |
Get all the syntactical interpretations using a dedicated iterator
| [in] | iterator | The interpretation iterator |
| [in] | output | The structure where to output interpretations |
TRUE if it remains interpretations to get after function completion, FALSE otherwiseParcours_Cyk_Iteratif | gboolean interpretationIteratorGetNextMPP | ( | InterpretationIterator * | iterator, | |
| ParsingResult * | output | |||
| ) |
Function equivalent to interpretationIteratorGetNext, but only for trees with an equal probability to the most probable parse
| [in] | iterator | The interpretation iterator |
| [in] | output | The structure where to output interpretations |
TRUE if it remains interpretations to get after function completion, FALSE otherwisePrint_MPP_Iteratively | void interpretationIteratorGoToFirst | ( | InterpretationIterator * | iterator | ) |
Reinitialize an interpretation iterator in such a that the next interpretationIteratorGetNext call will return the first available interpretation
| [in] | iterator | The interpretation iterator to initialize |
RaZ_Parcours_Cyk_Iteratif | void interpretationIteratorGoToFirstMPP | ( | InterpretationIterator * | iterator | ) |
Function equivalent to interpretationIteratorGoToFirst, but only for trees with an equal probability to the most probable parse.
iterator->exploration_list->current_derivation is initialized to the first interpretation with the maximum probability.| [in] | iterator | The interpretation iterator to initialize |
Init_Cyk_For_MPP | ParsingChart * parse | ( | const char * | sentence, | |
| const Grammar * | grammar, | |||
| const ParsingChartInitConfig * | init_config, | |||
| const ParsingMode | parsing_mode | |||
| ) |
Perform a syntactic analysis of a sentence using a given grammar
| [in] | sentence | The sentence to parse |
| [in] | grammar | The grammar to use |
| [in] | init_config | The chart initialization configuration to use. If this parameter is set to NULL, DEFAULT_PARSINGCHART_INIT_CONFIG is used |
| [in] | parsing_mode | The parsing mode |
Analyse_Syntaxique & Analyse_Syntaxique_Type | void parsingChartGetMostProbableInterpretation | ( | const ParsingChart * | parsing_chart, | |
| const unsigned int | row, | |||
| const unsigned int | column, | |||
| const gboolean | only_top_nt, | |||
| ParsingResult * | output | |||
| ) |
Extract the most probable interpretation stored in parsing chart cell
| [in] | parsing_chart | The considered parsing chart |
| [in] | row | The chart cell row index (from 1 to size) |
| [in] | column | The chart cell column index (from 1 to size - row + 1) |
| [in] | only_top_nt | A flag indicating if only interpretations starting with the higher level non-terminal are taken into account (TRUE), or if all interpretations are considered (FALSE) |
| [out] | output | The result where to output |
Extrait_Plus_Probable
| void(* parsingChartApplyParsing[])(ParsingChart *) |
Apply the parsing algorithm to a chart already lexically initialized
| [in] | chart | The parsing chart to treat |
| void(*[ParsingMode parsing_mode]) parsingChartApplyParsing(ParsingChart *chart) |
Apply the parsing algorithm to a chart already lexically initialized
| [in] | chart | The parsing chart to treat |
| void(*[ParsingMode parsing_mode]) parsingChartAutoFill(ParsingChart *chart, const unsigned int row, const unsigned int column, const unsigned int max_column) |
Automatically fill a parsing chart cell using the parsing algorithm. Identify elements stored in the cell that can lead to other elements using X -> Y like rules
| [in] | chart | The considered parsing chart |
| [in] | row | The row index of the chart cell to fill |
| [in] | column | The column index of the chart cell to fill |
| [in] | max_column | The maximal considered column index |
1.4.7