First stab at transducer cascade lookup routines.
More...
Go to the source code of this file.
Functions |
|
static gfsmxlCascadeLookup * | gfsmxl_cascade_lookup_new_full (gfsmxlCascade *csc, gfsmWeight max_w, guint max_paths, guint max_ops) |
static gfsmxlCascadeLookup * | gfsmxl_cascade_lookup_new (void) |
static void | gfsmxl_cascade_lookup_set_cascade (gfsmxlCascadeLookup *cl, gfsmxlCascade *csc) |
static void | gfsmxl_cascade_lookup_free (gfsmxlCascadeLookup *cl) |
|
gfsmAutomaton * | gfsmxl_cascade_lookup_nbest (gfsmxlCascadeLookup *cl, gfsmLabelVector *input, gfsmAutomaton *result) |
gfsmxlPathArray * | gfsmxl_cascade_lookup_nbest_paths (gfsmxlCascadeLookup *cl, gfsmLabelVector *input, gfsmxlPathArray *paths) |
|
void | gfsmxl_cascade_lookup_reset (gfsmxlCascadeLookup *cl) |
static gfsmAutomaton * | gfsmxl_cascade_lookup_nbest_prepare_ (gfsmxlCascadeLookup *cl, gfsmAutomaton *result) |
static gfsmxlCascadeLookupConfig * | gfsmxl_cascade_lookup_ensure_config (gfsmxlCascadeLookup *cl, gfsmxlCascadeLookupConfig *cfg_key) |
void | gfsmxl_cascade_lookup_nbest_search_ (gfsmxlCascadeLookup *cl, gfsmLabelVector *input) |
void | gfsmxl_cascade_lookup_nbest_backtrace_ (gfsmxlCascadeLookup *cl, gfsmxlCascadeLookupConfig *cfg, gfsmxlCascadeLookupConfig *nxt, gfsmAutomaton *result) |
void | gfsmxl_cascade_lookup_nbest_backtrace_path_ (gfsmxlCascadeLookup *cl, gfsmxlCascadeLookupConfig *cfg, gfsmPath *p) |
gfsmAutomaton * | gfsmxl_cascade_lookup_nbest_debug (gfsmxlCascadeLookup *cl, gfsmLabelVector *input, gfsmAutomaton *result) |
|
static gfsmxlPathArray * | gfsmxl_patharray_new (guint n_paths) |
static void | gfsmxl_patharray_free (gfsmxlPathArray *paths) |
void | gfsmxl_patharray_clear (gfsmxlPathArray *paths) |
|
static int | gfsmxl_cascade_lookup_config_fh_compare (gfsmxlCascadeLookupConfig *lc1, gfsmxlCascadeLookupConfig *lc2) |
guint | gfsmxl_cascade_lookup_config_ht_hash (gfsmxlCascadeLookupConfig *lc) |
gboolean | gfsmxl_cascade_lookup_config_ht_equal (gfsmxlCascadeLookupConfig *lc1, gfsmxlCascadeLookupConfig *lc2) |
static gfsmxlCascadeLookupConfig * | gfsmxl_cascade_lookup_config_new_full (gfsmxlCascade *csc, gfsmxlCascadeStateId qids, guint32 ipos, gfsmStateId oid, gfsmStateId rid, gfsmWeight w, gfsmxlCascadeLookupBacktrace bt) |
static gfsmxlCascadeLookupConfig * | gfsmxl_cascade_lookup_config_new (gfsmxlCascadeLookup *cl) |
static void | gfsmxl_cascade_lookup_config_copy (gfsmxlCascadeLookupConfig *dst, gfsmxlCascadeLookupConfig *src) |
static gfsmxlCascadeLookupConfig * | gfsmxl_cascade_lookup_config_clone (gfsmxlCascadeLookupConfig *src) |
static void | gfsmxl_cascade_lookup_config_free_inline (gfsmxlCascadeLookupConfig *lc) |
void | gfsmxl_cascade_lookup_config_free (gfsmxlCascadeLookupConfig *lc) |
|
void | gfsmxl_cascade_lookup_config_list_free (gfsmxlCascadeLookupConfigList *lcl) |
Detailed Description
Typedef Documentation
Function Documentation
Create a new gfsmxlCascadeLookup, specifying initial data (csc will be freed with the returned lookup object)
(re-)set underlying cascade of a gfsmxlCascadeLookup.
- frees old cascade, if any
- csc will be freed with cl
Resets state of a gfsmxlCascadeLookup, preparing it for another lookup
- implicitly called by gfsm_cascade_lookup_nbest()
Get best config matching cfg_tmp (according to gfsmxl_lookup_config_ht_hash(), gfsmxl_lookup_config_ht_equal()). Updates administrative data (cl->heap, cl->configs)
appropriately.
- Parameters
-
cl | lookup object |
cfg_key | configuration to match or create |
- Returns
- NULL if an equal-or-better config is already known to cl, otherwise a clone of cfg_tmp
Heap-element comparison function for gfsmxlCascadeLookupConfig (inline)
- Compares only weights and input positions!
- Behaves basically like the perl code:
(lc1->w <=> lc2->w) || (lc2->ipos <=> lc1->ipos)
Allocate a gfsmxlCascadeLookupConfig.
- Parameters
-
csc | underlying cascade |
qids | state ids for the config (will be copied into cfg->qids) |
w | initial accumulated weight for the config |
bt | configuration backtrace data (parent configuration) |
Copy a ::gfsmCascadeLookupConfig src to dst, which must already be allocated.
- Returns
- dst
Variable Documentation