---+ Reweight ---++ Description This operation reweights an FST according to the potentials and in the direction specified by the user. Weight needs to be left distributive when reweighting towards the initial state and right distributive when reweighting towards the final states. 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. ---++ 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>| %DOX{namespacefst.html#Reweight[%H%]}% | |<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: r3 - 2007-07-05 - CyrilAllauzen
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