summaryrefslogtreecommitdiff
path: root/gi/posterior-regularisation/train_pr_global.py
diff options
context:
space:
mode:
authortrevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-07 14:11:42 +0000
committertrevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-07 14:11:42 +0000
commita15d666d23169dafdf01b7f5923570a9ba10787b (patch)
tree5f74648ef8e0d9a6c36c211d0d31a0465b2a295c /gi/posterior-regularisation/train_pr_global.py
parent43d74920424e83c397321db549290f167e15db46 (diff)
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@173 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/posterior-regularisation/train_pr_global.py')
-rw-r--r--gi/posterior-regularisation/train_pr_global.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/gi/posterior-regularisation/train_pr_global.py b/gi/posterior-regularisation/train_pr_global.py
index 8b80c6bc..f2806b6e 100644
--- a/gi/posterior-regularisation/train_pr_global.py
+++ b/gi/posterior-regularisation/train_pr_global.py
@@ -290,10 +290,4 @@ for p, (phrase, ccs) in enumerate(edges_phrase_to_context):
cz = sum(conditionals)
conditionals /= cz
- #scores = zeros(num_tags)
- #li = lamba_index[phrase, context]
- #for t in range(num_tags):
- # scores[t] = conditionals[t] * exp(-lamba[li + t])
-
- #print '%s\t%s ||| C=%d ||| %d |||' % (phrase, context, count, argmax(scores)), scores / sum(scores)
- print '%s\t%s ||| C=%d ||| %d |||' % (phrase, context, count, argmax(conditionals)), conditionals
+ print '%s\t%s ||| C=%d |||' % (phrase, context, argmax(conditionals)), conditionals