1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
use Borrow;
use Result;
use crateReplaceFst;
use crate;
use crateSemiring;
use crateLabel;
/// Recursively replaces trs in the root FSTs with other FSTs.
///
/// Replace supports replacement of trs in one Fst with another FST. This
/// replacement is recursive. Replace takes an array of FST(s). One FST
/// represents the root (or topology) machine. The root FST refers to other FSTs
/// by recursively replacing trs labeled as non-terminals with the matching
/// non-terminal FST. Currently Replace uses the output symbols of the trs to
/// determine whether the transition is a non-terminal transition or not. A non-terminal can be
/// any label that is not a non-zero terminal label in the output alphabet.
///
/// Note that input argument is a vector of pairs. These correspond to the tuple
/// of non-terminal Label and corresponding FST.
///
/// # Example
///
/// ## Root Fst
///
/// 
///
/// ## Fst for non-terminal #NAME
///
/// 
///
/// ## Fst for non-termincal #FIRSTNAME
///
/// 
///
/// ## Fst for non-termincal #LASTNAME
///
/// 
///
/// ## Output
///
/// 
///