Difference: PyniniStringDoc (2 vs. 3)

Revision 32018-01-26 - KyleGorman

Line: 1 to 1
 

String (de)compilation

This directory contains functions useful for mapping strings into FSAs

Line: 120 to 120
 

String maps

Changed:
<
<
fst::CompileStringMap compiles an FST from a vector of pairs of input strings. Each input pair of strings is used to form a cross-product transducer (see here) using the user-specified compilation mode (as above). The resulting FST represents the union of all pairs of cross-products.

fst::CompileStringFile is quite similar to fst::CompileStringMap, except that it reads pairs of input strings directly from a two-column TSV (tab-separated values) file.

Both functions take separate specifications for the input- and output-side compilation mode. By specifying separate input and output compilation modes, one can build a transducer that acts as a converter between modes.

Both functions use a prefix-tree construction, so the resulting FST may be significantly more compact than would be generated by repeated invocations of fst::Union.

>
>
fst::CompileStringMap compiles an FST from a vector of vector of strings. The first element in each inner vector is interpreted as the input string. The optional second element is interpreted as the output string for the transduction; if not specified it defaults to the value of the first element. An optional third element is interpreted as a weight for the transduction; if not specified it defaults to semiring One.

These elements are used to form a cross-product transducer using the user-specified compilation mode (as above). The resulting FST represents the union of all pairs of weighted cross-products.

fst::CompileStringFile is quite similar to fst::CompileStringMap, except that it reads pairs of input strings directly from a one-to-three-column TSV (tab-separated values) file.

Both functions use a prefix-tree construction, so the resulting FST may be significantly more compact than would be generated by repeated invocations of fst::Union.

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback