From 04e9f2092b17c6732d07d15af55118aec41ef49d Mon Sep 17 00:00:00 2001 From: graehl Date: Tue, 13 Jul 2010 02:29:49 +0000 Subject: Tanimoto coeff fix git-svn-id: https://ws10smt.googlecode.com/svn/trunk@228 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/sparse_vector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'decoder') diff --git a/decoder/sparse_vector.h b/decoder/sparse_vector.h index bfdeebcc..6b256a8e 100644 --- a/decoder/sparse_vector.h +++ b/decoder/sparse_vector.h @@ -83,7 +83,7 @@ public: template S tanimoto_coef(const SparseVector &vec) const { S dp=dot(vec); - return dp/(l2norm_sq()*vec.l2norm_sq()-dp); + return dp/(l2norm_sq()+vec.l2norm_sq()-dp); } template -- cgit v1.2.3