Skip to content
Browse files

added output of label probability in the log

  • Loading branch information...
1 parent c32d09e commit cb53a9d6ae744afefb97dcc12bfbcd077ffa5d93 @mromanello committed Aug 4, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 citation_extractor/crfpp_wrap.py
View
2 citation_extractor/crfpp_wrap.py
@@ -55,7 +55,7 @@ def classify(self,l_tokens):
probs['alpha']="%f"%vals[1]
probs['beta']="%f"%vals[2]
res['probs'][tag]=probs
- self.logger.info("%s => %s"%(res["token"].decode("utf-8"),res["label"].decode("utf-8")))
+ self.logger.info("%s => %s (%s)"%(res["token"].decode("utf-8"),res["label"].decode("utf-8"),str(res["probs"][res["label"]]['prob'])))
out.append(res)
return out

0 comments on commit cb53a9d

Please sign in to comment.
Something went wrong with that request. Please try again.