visual studio

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@2897 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
hieuhoang1972 2010-02-14 00:26:34 +00:00
parent 6aff4f1afd
commit 6b1b505089
3 changed files with 15 additions and 4 deletions

View File

@ -339,6 +339,10 @@
RelativePath=".\src\IOWrapper.cpp"
>
</File>
<File
RelativePath=".\src\LatticeMBR.cpp"
>
</File>
<File
RelativePath=".\src\Main.cpp"
>
@ -361,6 +365,10 @@
RelativePath=".\src\IOWrapper.h"
>
</File>
<File
RelativePath=".\src\LatticeMBR.h"
>
</File>
<File
RelativePath=".\src\Main.h"
>
@ -373,6 +381,10 @@
RelativePath=".\src\TranslationAnalysis.h"
>
</File>
<File
RelativePath=".\src\utf8.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"

View File

@ -451,10 +451,10 @@ vector<Word> calcMBRSol(const TrellisPathList& nBestList, map<Phrase, float>& f
}
if (ngramScore == 0) {
ngramScore = log(ngrams->second) + ngramPosterior + log(mbrThetas[(ngrams->first).GetSize()]);
ngramScore = log((double) ngrams->second) + ngramPosterior + log(mbrThetas[(ngrams->first).GetSize()]);
}
else {
ngramScore = log_sum(ngramScore, float(log(ngrams->second) + ngramPosterior + log(mbrThetas[(ngrams->first).GetSize()])));
ngramScore = log_sum(ngramScore, float(log((double) ngrams->second) + ngramPosterior + log(mbrThetas[(ngrams->first).GetSize()])));
}
//cout << "Ngram: " << ngrams->first << endl;
}

View File

@ -27,10 +27,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#if defined(BOOST_HAS_PTHREADS)
#include <pthread.h>
#endif
#include <boost/bind.hpp>
#include <boost/thread.hpp>
#endif
#include "Util.h"