Description
This operation randomly generates a set of successful sentences in the input FST and outputs them in finite-state archive format.
Backoff transitions, represented as epsilon transitions, are correctly interpreted as failure transitions, which distinguishes this
operation from OpenFst
RandGen (with the
LogProbArcSelector
). The (maximum) number of sentences generated, their maximum length, and the random seed can all be specified as options.
Usage
ngramrandgen [--opts] [[in.fst [out.far]]
--max_sents: type = int64, default = 1
--max_length: type = int, default = INT_MAX
--seed: type = int, default = time()
|
Examples
$ ngramrandgen in.mod >out.far
Caveats
References