From c0b9b8a066ff72711348720d54394088c75f35ec Mon Sep 17 00:00:00 2001 From: "trevor.cohn" Date: Wed, 30 Jun 2010 21:26:24 +0000 Subject: Some tweaks git-svn-id: https://ws10smt.googlecode.com/svn/trunk@82 ec762483-ff6d-05da-a07a-a48fb63a330f --- gi/posterior-regularisation/train_pr_global.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gi/posterior-regularisation/train_pr_global.py') diff --git a/gi/posterior-regularisation/train_pr_global.py b/gi/posterior-regularisation/train_pr_global.py index 6ce7290d..8b80c6bc 100644 --- a/gi/posterior-regularisation/train_pr_global.py +++ b/gi/posterior-regularisation/train_pr_global.py @@ -263,7 +263,9 @@ for iteration in range(20): scores[t] = conditionals[t] * exp(-lamba[li + t] - lamba[omega_offset + li + t]) z += count * sum(scores) - tagCounts[p] += count * scores + for t in range(num_tags): + tagCounts[p][t] += count * scores[t] + for i in range(4): for t in range(num_tags): contextWordCounts[i][t][types[context[i]]] += count * scores[t] -- cgit v1.2.3