public class Compose
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
augment(int label,
Fst fst,
Semiring semiring)
Augments the labels of an Fst in order to use it for composition avoiding
multiple epsilon paths in the resulting Fst
Augment can be applied to both
Fst and
ImmutableFst , as immutable fsts hold an
additional null arc for that operation |
static Fst |
compose(Fst fst1,
Fst fst2,
Semiring semiring,
boolean sorted)
Computes the composition of two Fsts.
|
static Fst |
get(Fst fst1,
Fst fst2,
Semiring semiring)
Computes the composition of two Fsts.
|
static Fst |
getFilter(java.lang.String[] syms,
Semiring semiring)
Get a filter to use for avoiding multiple epsilon paths in the resulting
Fst
See: M.
|
public static Fst compose(Fst fst1, Fst fst2, Semiring semiring, boolean sorted)
fst1
- the first Fstfst2
- the second Fstsemiring
- the semiring to use in the operationsorted
- sort resultpublic static Fst get(Fst fst1, Fst fst2, Semiring semiring)
fst1
- the first Fstfst2
- the second Fstsemiring
- the semiring to use in the operationpublic static Fst getFilter(java.lang.String[] syms, Semiring semiring)
syms
- the gilter's input/output symbolssemiring
- the semiring to use in the operationpublic static void augment(int label, Fst fst, Semiring semiring)
Fst
and
ImmutableFst
, as immutable fsts hold an
additional null arc for that operationlabel
- constant denoting if the augment should take place on input
or output labels For value equal to 0 augment will take place
for input labels For value equal to 1 augment will take place
for output labelsfst
- the fst to augmentsemiring
- the semiring to use in the operation