---+ Reweight ---++ Description This operation reweights an FST according to the potentials and in the direction specified by the user. An arc of weight _w_, with an origin state of potential _p_ and destination state of potential _q_, is reweighted by _p_ <sup>-1</sup> ⊗ (_w_ ⊗ _q_) when reweighting towards the initial state and by (_p_ ⊗ _w_) ⊗ _q_ <sup>-1</sup> when reweighting towards the final states. The weights need to be left distributive when reweighting towards the initial state and right distributive when reweighting towards the final states (valid for =TropicalWeight= and =LogWeight=). ---++ Usage |<verbatim> enum ReweightType { REWEIGHT_TO_INITIAL, REWEIGHT_TO_FINAL }; template <class Arc> void Reweight(MutableFst<Arc> *fst, vector<typename Arc::Weight> potential, ReweightType type) </verbatim>| |<verbatim> fstreweight [--opts] a.fst potentials.txt out.fst --to_final: type = bool, default = false Push/reweight to final (vs. to initial) states </verbatim> | ---++ Complexity =Reweight=: * Time: _O(V + E)_ * Space: _O(V + E)_ %BR% where _V_ = # of states and _E_ = # of arcs. -- Main.CyrilAllauzen - 04 Jul 2007
This topic: FST
>
WebHome
>
FstQuickTour
>
ReweightDoc
Topic revision: r6 - 2018-04-27 - MichaelRiley
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback