From 19840a3f47d64c38753c1fac46cb4f39212fc99f Mon Sep 17 00:00:00 2001 From: redpony Date: Mon, 15 Nov 2010 17:07:04 +0000 Subject: model 1 options git-svn-id: https://ws10smt.googlecode.com/svn/trunk@723 ec762483-ff6d-05da-a07a-a48fb63a330f --- training/mr_em_adapted_reduce.cc | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'training/mr_em_adapted_reduce.cc') diff --git a/training/mr_em_adapted_reduce.cc b/training/mr_em_adapted_reduce.cc index 52387e7f..29416348 100644 --- a/training/mr_em_adapted_reduce.cc +++ b/training/mr_em_adapted_reduce.cc @@ -6,36 +6,15 @@ #include #include -#include "config.h" -#ifdef HAVE_BOOST_DIGAMMA -#include -using boost::math::digamma; -#endif - #include "filelib.h" #include "fdict.h" #include "weights.h" #include "sparse_vector.h" +#include "em_utils.h" using namespace std; namespace po = boost::program_options; -#ifndef HAVE_BOOST_DIGAMMA -#warning Using Mark Johnsons digamma() -double digamma(double x) { - double result = 0, xx, xx2, xx4; - assert(x > 0); - for ( ; x < 7; ++x) - result -= 1/x; - x -= 1.0/2.0; - xx = 1.0/x; - xx2 = xx*xx; - xx4 = xx2*xx2; - result += log(x)+(1./24.)*xx2-(7.0/960.0)*xx4+(31.0/8064.0)*xx4*xx2-(127.0/30720.0)*xx4*xx4; - return result; -} -#endif - void InitCommandLine(int argc, char** argv, po::variables_map* conf) { po::options_description opts("Configuration options"); opts.add_options() -- cgit v1.2.3