SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
cwr_fst.c File Reference

Finite state transducers – IO & conversion. More...

Data Structures

union  SprFSTCArc
 Description of a set of arcs (== state) in the FST. More...
 
struct  SprFSTArcInfo
 
union  SprCwrFSTSymSet
 some arcs may contain a set of words as output symbol More...
 
struct  SprCwrFSTSizes
 
struct  SprCwrFSTC
 

Macros

#define spr_cwr_fst_def_state(state)
 
#define spr_cwr_fst_state_get_extra_info_ptr(fst_ptr, state_info_size)
 
#define spr_cwr_fst_arc_get_state(fst_ptr, state)
 
#define spr_cwr_fst_arc_state2flags(state)
 
#define spr_cwr_fst_arc_mark_visited(fst_ptr, state)
 
#define spr_cwr_fst_arc_unmark_visited(fst_ptr, state)
 
#define spr_cwr_fst_arc_get_data(res_ptr, fst_ptr, state, state_info_size)
 
#define spr_cwr_fst_arc_skip_data(fst_ptr, state, state_info_size)
 

Enumerations

enum  {
  SPR_CWR_FST_ARC_LAST, SPR_CWR_FST_ARC_OSYMB_FINAL, SPR_CWR_FST_ARC_COST, SPR_CWR_FST_ARC_OSYMB,
  SPR_CWR_FST_ARC_NTRIV_NEXT, SPR_CWR_FST_ARC_VISITED, SPR_CWR_FST_ARC_SHIFT
}
 flags for the 'flags_isymb' field More...
 
enum  { SPR_CWR_FST_SYMB_EPS, SPR_CWR_FST_SYMB_FINAL }
 special input symbols on the arcs More...
 

Functions

size_t spr_cwr_fstc_size (SprCwrFSTSizes *fst_sizes, unsigned int state_info_size, unsigned int state_info_align)
 
SprCwrFSTCspr_cwr_fstc_free (SprCwrFSTC *fst)
 
SprCwrFSTCspr_cwr_fstc_read (SprCwrFSTC *fst, const char *fname, const char *options, const SprCwrSLex *lex_isymb, const SprCwrSLex *lex_osymb, unsigned int state_info_size, unsigned int state_info_align)
 
int spr_cwr_fstc_write (const SprCwrFSTC *fst, const char *fname, int ASCII)
 
void spr_cwr_fstc_clear_visited (SprCwrFSTC *fst)
 
SprCwrFSTCspr_cwr_fst_static2dyn (SprCwrFSTC *fst, const char *fname)
 
SprCwrFSTCspr_cwr_fst_dyn2static (SprCwrFSTC *fst, const char *fname)
 

Variables

const SprCwrFSTC spr_cwr_empty_fst_c
 
const SprCmdOptDesc spr_cwr_od_fst_read []
 

Detailed Description

Finite state transducers – IO & conversion.

Input/output and conversion of Finite State Transducers (FST's). FST's can be stored on disk in two formats: binary and ASCII. On reading, the format is detected automatically. On writing, the format must be specified. An FST can also be stored in memory in two formats: a compact (static) representation, and a dynamic (and substantially larger) representation.

Date
July 2006
Author
Kris Demuynck
Revision History:
XX/07/2006 - KD
Creation (FLaVoR)
13/04/2010 - KD
added to SPRAAK