summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-13 02:29:49 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-13 02:29:49 +0000
commit8706ce7e94cd4df4199f8e489c4729e94bf853cf (patch)
tree03df0578e762fb80cea21c994a2cde027751dbb1
parent2d6a5896df99904b0c492e77168489636d545869 (diff)
Tanimoto coeff fix
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@228 ec762483-ff6d-05da-a07a-a48fb63a330f
-rw-r--r--decoder/sparse_vector.h2
1 files changed, 1 insertions, 1 deletions
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<typename S>
S tanimoto_coef(const SparseVector<S> &vec) const {
S dp=dot(vec);
- return dp/(l2norm_sq()*vec.l2norm_sq()-dp);
+ return dp/(l2norm_sq()+vec.l2norm_sq()-dp);
}
template<typename S>