diff options
author | trevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-06-30 21:26:24 +0000 |
---|---|---|
committer | trevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-06-30 21:26:24 +0000 |
commit | c0b9b8a066ff72711348720d54394088c75f35ec (patch) | |
tree | 8409d71bb2773cb632bd5b81c5b3afb7e8e2e4e4 /gi/posterior-regularisation/train_pr_global.py | |
parent | 49f18f61b6b4b8c347ef948934f349b1c1421015 (diff) |
Some tweaks
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@82 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/posterior-regularisation/train_pr_global.py')
-rw-r--r-- | gi/posterior-regularisation/train_pr_global.py | 4 |
1 files changed, 3 insertions, 1 deletions
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] |