mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Support combining two LMs
This commit is contained in:
parent
482efb8020
commit
c3c6d4c3c4
@ -7,11 +7,11 @@
|
|||||||
Given two LMs "A" and "B", this script modifies
|
Given two LMs "A" and "B", this script modifies
|
||||||
probabilities in A such that
|
probabilities in A such that
|
||||||
|
|
||||||
P_{A_{new}}(w_n|w0,w1,...,w_{n-1}) = P_{A_{original}}(w_n|w0,w1,...,w_{n-1}) / P_{B}(w_n|w0,w1,...,w_{n-1})
|
P_{A_{new}}(w_n|w_0,w_1,...,w_{n-1}) = P_{A_{original}}(w_n|w_0,w_1,...,w_{n-1}) / P_{B}(w_n|w_0,w_1,...,w_{n-1})
|
||||||
|
|
||||||
When it is formulated in log-space, it becomes
|
When it is formulated in log-space, it becomes
|
||||||
|
|
||||||
\log P_{A_{new}}(w_n|w0,w1,...,w_{n-1}) = \log P_{A_{original}}(w_n|w0,w1,...,w_{n-1}) - \log P_{B}(w_n|w0,w1,...,w_{n-1})
|
\log P_{A_{new}}(w_n|w_0,w_1,...,w_{n-1}) = \log P_{A_{original}}(w_n|w_0,w_1,...,w_{n-1}) - \log P_{B}(w_n|w_0,w_1,...,w_{n-1})
|
||||||
|
|
||||||
Optionally, you can pass a scale for the LM "B", such that
|
Optionally, you can pass a scale for the LM "B", such that
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user