From: Jason Eisner Date: Wed, 10 Jul 2013 13:15:03 +0000 (-0400) Subject: minor edits X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=dbba44392f8ec07d50622248e0232d5c7a3e5121;p=dyna2 minor edits --- diff --git a/examples/forward-backward.dyna b/examples/forward-backward.dyna index b3a2c62..facf3c5 100644 --- a/examples/forward-backward.dyna +++ b/examples/forward-backward.dyna @@ -1,3 +1,7 @@ +% Forward-backward reestimation of an HMM. +% The data and initial model from the "ice cream" spreadsheet +% example can be found in icecream.dyna. + % --------------------------------------------------- % INPUT % --------------------------------------------------- @@ -107,8 +111,7 @@ p_emission(I+1,Tag,Word) % has probability 1 regardless of smoothing. This overrides the previous % rules. -p_emission(0,&stop,&eos) := 1. -p_emission(I+1,&stop,&eos) := p_emission(I,&stop,&eos) for I < num_iterations. +p_emission(I,&stop,&eos) := 1 for is_iter(I). % --------------------------------------------------- % DRAW CONCLUSIONS FROM THE ESTIMATED MODEL @@ -128,3 +131,4 @@ bestpathprob(State) max= edge(num_iterations,State,NextState) * bestpathprob(Nex bestpathprob = bestpathprob(start_state). bestpath = $key(bestpathprob(start_state)). +p \ No newline at end of file