ParsingResult - Parsing Result structure module
[Syntactic tools level]

Definition and handling of parsing result data structure (former briques_cyk & parsing_output modules). More...

Data Structures

struct  ParsingResult
 Parsing result. More...
struct  Brick
 Interpretation basic brick. More...

Typedefs

typedef PointerArray BrickArray
 Dynamic array of Brick.

Enumerations

enum  AnalysisFormat { INDENTED, FLAT_BRACKETING }
 Analysis textual output format. More...

Functions

ParsingResultparsingResultCreate (const AnalysisFormat text_format, const gboolean analysis, const gboolean brick_list, const gboolean rules_list)
void brickArrayFree (BrickArray *brick_array)
void parsingResultFree (ParsingResult **parsing_result)
void parsingResultSetAnalysisFormat (ParsingResult *parsing_result, const AnalysisFormat format)
void brickArrayRemoveAll (BrickArray *brick_array)
void brickArrayAddBrick (BrickArray *brick_array, const char *original_word, const long correction_index, const Morpho part_of_speech, const Probability probability_knowing_pos, const Weight correction_cost)

Detailed Description

Definition and handling of parsing result data structure (former briques_cyk & parsing_output modules).

SlpTK Library 0.6.0

Required header
<parsingresult.h>
Author:
Jean-Cédric Chappelier - briques_cyk (creation on 11.04.1997)

Jean-Cédric Chappelier - parsing_output (creation on 29.06.2001)

Antonin Merçay (revision on 27.01.2005)

Date:
2 March 2005
Version:
0.6.0

Typedef Documentation

typedef PointerArray BrickArray

Dynamic array of Brick.

See also:
ParsingResult


Enumeration Type Documentation

enum AnalysisFormat

Analysis textual output format.

Enumeration of textual formats under which syntactic analysis can be outputed

Enumerator:
INDENTED  Analysis structure is represented using indented text, i.e. greater is the indentation, deeper we are in the analysis
FLAT_BRACKETING  Analysis structure is represented as a flat text, square brackets are used to signify the descent ([) or the ascent (]) into the analysis


Function Documentation

void brickArrayAddBrick ( BrickArray brick_array,
const char *  original_word,
const long  correction_index,
const Morpho  part_of_speech,
const Probability  probability_knowing_pos,
const Weight  correction_cost 
)

Add a new Brick to a brick array

Remarks:
Memory allocation set to the value of the related argument is performed for the Brick::original_word field
Parameters:
[in] brick_array The brick array to add to
[in] original_word The value of the original_word field of the new brick
[in] correction_index The value of the correction_index field of the new brick
[in] part_of_speech The value of the part_of_speech field of the new brick
[in] probability_knowing_pos The value of the probability_knowing_pos field of the new brick
[in] correction_cost The value of the correction_cost field of the new brick
See also:
brickArrayFree() brickArrayRemoveAll()
Former(s) function(s):
Ajoute_Brique_cyk

void brickArrayFree ( BrickArray brick_array  ) 

Free the memory allocated to a brick array

Remarks:
The memory allocation for Brick::original_word field of each brick is also freed
Parameters:
[in] brick_array The brick array to free
See also:
brickArrayAddBrick() brickArrayRemoveAll()
Former(s) function(s):
Libere_Briques_cyk

void brickArrayRemoveAll ( BrickArray brick_array  ) 

Remove all the bricks of a Brick array and free the allocated memory

Remarks:
The memory allocations for Brick::original_word field of each brick is also freed
Parameters:
[in] brick_array The considered brick array
See also:
brickArrayFree() brickArrayAddBrick()

ParsingResult * parsingResultCreate ( const AnalysisFormat  text_format,
const gboolean  analysis,
const gboolean  brick_list,
const gboolean  rules_list 
)

Instanciate and initialize a new parsing result (constructor). The various arguments allows to select under which format(s) the syntactic interpretation must be outputed

Parameters:
[in] text_format Set the format of the character string representation (if analysis is set)
[in] analysis Set if the interpretation is outputed as a character string, i.e. the ParsingResult::analysis field must be set
[in] brick_list Set if the interpretation is outputed as a list of Brick, i.e. the ParsingResult::brick_array field must be set
[in] rules_list Set if the interpretation is outputed as a list of syntactic rules, i.e. the ParsingResult::rules_list field must be set
Returns:
The new parsing result instance
See also:
parsingResultFree()
Former(s) function(s):
Init_Parsing_Output, Init_Parsing_Output_XCString, Init_Parsing_Output_Briques_cyk & Init_Parsing_Output_Dyntab_longint

void parsingResultFree ( ParsingResult **  parsing_result  ) 

Free the memory allocated to a parsing result (destructor)

Parameters:
[in] parsing_result The parsing result to free
See also:
parsingResultCreate()
Former(s) function(s):
Delete_Parsing_Output

void parsingResultSetAnalysisFormat ( ParsingResult parsing_result,
const AnalysisFormat  format 
)

Set the format of the textual representation, i.e. of the ParsingResult::analysis field (that is instanciate if it wasn't already the case)

Parameters:
[in] parsing_result The considered parsing result
[in] format The new format to use
See also:
parsingResultCreate()
Former(s) function(s):
Set_Parsing_Output_to_Extended & Set_Parsing_Output_to_Bracketed


Generated on Thu Mar 22 17:46:31 2007 for SlpTk by  doxygen 1.4.7