TWiki> FST Web>FstQuickTour>ReweightDoc (revision 5)EditAttach



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 -1 ⊗ (wq) when reweighting towards the initial state and by (pw) ⊗ q -1 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).


template <class Arc>
void Reweight(MutableFst<Arc> *fst, vector<typename Arc::Weight> potential, ReweightType type)
doc [bad link?]
fstreweight [--opts] a.fst potentials.txt out.fst
    --to_final: type = bool, default = false
      Push/reweight to final (vs. to initial) states



  • Time: O(V + E)
  • Space: O(V + E)
where V = # of states and E = # of arcs.

-- CyrilAllauzen - 04 Jul 2007

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r5 - 2007-07-11 - MichaelRiley
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback