SPRAAK
|
Define the word lattice interface and provide the word lattice IO & hash operations. More...
Data Structures | |
struct | SprWlatO |
struct | SprWlatC |
struct | SprWlatA |
struct | SprWlatR |
struct | SprWlatS |
struct | SprWlatEIDD |
union | _Union1_WLAT_MASTER_ |
struct | SprWlatEI |
union | _Union2_WLAT_MASTER_ |
struct | SprWlatEvent |
struct | SprWlatList |
struct | SprWlatModInf |
struct | SprWlatModule |
struct | SprWlatPipe |
struct | SprWlatHTE |
union | _Union6_WLAT_MASTER_ |
struct | SprWlatHTDB |
hash data block More... | |
struct | SprWlatHT1 |
struct | SprWlatHTH |
struct | SprWlatHT2 |
Typedefs | |
typedef const SprWlatEvent *(* | _FuncPtr3_WLAT_MASTER_ )(unsigned int port, const SprWlatEvent *event, const struct spr_t_wlat_module *module) |
typedef int(* | _FuncPtr4_WLAT_MASTER_ )(struct spr_t_wlat_module *module, const char **descript, const SprCmdDesc **help) |
typedef const SprWlatEvent *(* | _FuncPtr5_WLAT_MASTER_ )(unsigned int port, const SprWlatEvent *event, const struct spr_t_wlat_module *module) |
Variables | |
const SprWlatEIDD | spr_wlat_ei_dd_null |
SprWlatEI *const | spr_wlat_ei_null |
const SprWlatEIDD | spr_wlat_ei_dd_string |
const int *const | spr_wlat_dummy_lm_wsets [] |
negative ID's are interpreted as word sets by the LM routines More... | |
const SprWlatModInf | spr_wlat_mi_root |
const SprWlatModInf | spr_wlat_mi_read |
const SprWlatModInf | spr_wlat_mi_write |
const SprWlatModInf | spr_wlat_mi_filter |
const SprWlatModInf | spr_wlat_mi_check |
Define the word lattice interface and provide the word lattice IO & hash operations.
Define the word lattice interface and provide the word lattice IO & hash operations
Lattices have the following format when written on disk:
Each lattice start with a
File: <fname> [btime] [etime] ....
line indicating the file (or part thereof) the set of arcs and nodes following this line describe. The lattice itself is an FST, and consist of nodes, arcs and comment lines. Nodes are opened and close on a demand basis as to allow streaming lattices (no fixed number of nodes or arcs).
The exact format of all the content lines is:
[lattice_format] | |
---|---|
File: <fname> [btime] [etime] [ext_info] ... | |
Indicates the of a new lattice describing the audio signal <fname>[<btime>:<etime>]. | |
O <node_nr> <iframe> [ext_info] ... | |
Open a new node with index <node_nr> at frame <iframe>. Frame indices are relative w.r.t. the start of the lattice. Node numbers are arbitrary numbers (do not have to be sequatial). After a close (see the 'C' command), a node number may be reused. All nodes except for the terminal nodes must have a zero or positive index. The indices (-1,-2,-3,-4) are reserver for the terminal nodes. Every search routine will try to end in a -1 terminal node, and will only back of a -2, -3, -4 (in that order) terminal node as a last option (e.g. the higher order nodes are not present or cannot be reached given the search constraints). | |
C <node_nr> [ext_info] ... | |
Close an open node. All nodes that were opened (even the terminal nodes) must be closed. | |
A <src_node_nr> <dst_node_nr> <isymbol> [score](0.0) [osymbol](-1) [ext_info] ... | |
An arc going from node <src_node_nr> to node <dst_node_nr> with a cost <score> while observing input symbol <isymb> and producing output symbol <osymb>. Both the input and output nodes must be open. Arcs must be topologically sorted, i.e. before any arc may leave a node, all incomming arcs must be handled (listed). Both the input and output symbol are number refering to some lexicon. A (-1) input symbol equals the '<s>' symbol. A (-1) (or '/') output symbols equals no output symbol (epsilon). | |
D <src_node_nr> <dst_node_nr> [score](0.0) [ext_info] ... | |
An epsilon arcs, i.e. an arc without input or output symbol. | |
%[comment] ... | |
Comments. Have no real function, except for providing some readable information (typically summary statistics). The processing modules copy, ignore or produce comment lines but they do not process the content. |
The format of a lattice processing script is:
"[ROOT]" nr_outputs <nr> "["name_of_the_operation"]" <IO_description> <module_specific_arguments> ...
The ROOT block will be replaced by the input stream.
The configuration of every block should start with a description of its inputs and optionally the name of the block (by default the name of the operation is taken as name of the processing block):
[IO_description] | |
---|---|
INPUT[:port_nr_in](0) <src_module>[:port_nr_out](0) | |
Link the output from port <port_nr_out> of module <src_module> to input port number <port_nr_in> of this module. Input port 0 is handled automatically (linked to ouput port 0 of the previous module) if not defined. | |
NAME <module_name> | |
Give the module a name. By default the module type name (the strings between [...] hereunder) is used as name. |