Trees | Indices | Help |
---|
|
object --+ | FsgModel
Proxy of C FsgModel struct
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
__swig_setmethods__ =
|
|||
__swig_getmethods__ =
|
|
|||
Inherited from |
|
x.__setattr__('name', value) <==> x.name = value
|
repr(x)
|
__init__(FsgModel self, char const * name, LogMath logmath, float lw, int n) -> FsgModel __init__(FsgModel self, char const * path, LogMath logmath, float lw) -> FsgModel
|
word_id(FsgModel self, char const * word) -> int Look up a word in the FSG vocabulary. Word ID for this word |
word_add(FsgModel self, char const * word) -> int Add a word to the FSG vocabulary. Word ID for this new word. |
trans_add(FsgModel self, int src, int dst, int logp, int wid) Add the given transition to the FSG transition matrix. Duplicates (i.e., two transitions between the same states, with the same word label) are flagged and only the highest prob retained. |
null_trans_add(FsgModel self, int src, int dst, int logp) -> int Add a null transition between the given states. There can be at most one null transition between the given states; duplicates are flagged and only the best prob retained. Transition probs must be <= 1 (i.e., logprob <= 0). 1 if a new transition was added, 0 if the prob of an existing transition was upgraded; -1 if nothing was changed. |
tag_trans_add(FsgModel self, int src, int dst, int logp, int wid) -> int Add a "tag" transition between the given states. A "tag" transition is a null transition with a non-null word ID, which corresponds to a semantic tag or other symbol to be output when this transition is taken. As above, there can be at most one null or tag transition between the given states; duplicates are flagged and only the best prob retained. Transition probs must be <= 1 (i.e., logprob <= 0). 1 if a new transition was added, 0 if the prob of an existing transition was upgraded; -1 if nothing was changed. |
add_silence(FsgModel self, char const * silword, int state, float silprob) -> int Add silence word transitions to each state in given FSG. Parameters: ----------- state: state to add a self-loop to, or -1 for all states. silprob: probability of silence transition. |
add_alt(FsgModel self, char const * baseword, char const * altword) -> int Add alternate pronunciation transitions for a word in given FSG. |
writefile(FsgModel self, char const * path) Write FSG to a file. |
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sun May 21 11:34:47 2017 | http://epydoc.sourceforge.net |